Date: Fri, 06 Sep 2002 19:45:10 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: bmah@FreeBSD.ORG Cc: freebsd-current@FreeBSD.ORG Subject: Re: libmd bug on -CURRENT Message-ID: <24821.1031334310@critter.freebsd.dk> In-Reply-To: Your message of "Fri, 06 Sep 2002 09:08:10 PDT." <200209061608.g86G8AOF001414@intruder.bmah.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Good catch.
I'm surprised the compiler doesn't whine.
Poul-Henning
>Index: mdXhl.c
>===================================================================
>RCS file: /usr/local/cvsroot/src/lib/libmd/mdXhl.c,v
>retrieving revision 1.16
>diff -u -r1.16 mdXhl.c
>--- mdXhl.c 25 Mar 2002 13:50:40 -0000 1.16
>+++ mdXhl.c 6 Sep 2002 16:02:52 -0000
>@@ -66,6 +66,7 @@
> len = stbuf.st_size - ofs;
> if (lseek(f, ofs, SEEK_SET) < 0) return 0;
> n = len;
>+ i = 0;
> while (n > 0) {
> if (n > sizeof(buffer))
> i = read(f, buffer, sizeof(buffer));
>
>
>
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?24821.1031334310>
