From 2ca720053b7b8428b1d114a74e8b737ed95fae67 Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Fri, 6 Sep 2002 19:51:58 +0000 Subject: Fix a bug where calling MD5File(3) with a zero-length file generated an error, due to an uninitialized variable. Reviewed by: phk, archie --- lib/libmd/mdXhl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/libmd/mdXhl.c b/lib/libmd/mdXhl.c index 439e9fff7b89..ae968136ce93 100644 --- a/lib/libmd/mdXhl.c +++ b/lib/libmd/mdXhl.c @@ -66,6 +66,7 @@ MDXFileChunk(const char *filename, char *buf, off_t ofs, off_t len) 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)); -- cgit v1.3