From 59f93bf56c31431da79f81a932c6adbf8e88ef5c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 20 Jun 1995 12:00:55 +0000 Subject: [PATCH] (md5_file): Initialize two elements of LEN portably, rather than with ANSI aggregate initialization. Reported by Edzer Pebesma . --- src/md5sum.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/md5sum.c b/src/md5sum.c index cb292aa4c4..349bd77384 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -506,7 +506,7 @@ md5_file (filename, resblock, binary) /* Important: BLOCKSIZE must be a multiple of 64. */ #define BLOCKSIZE 4096 struct md5_ctx ctx; - uint32 len[2] = {0, 0}; + uint32 len[2]; char buffer[BLOCKSIZE + 72]; size_t pad, sum; FILETYPE f; @@ -529,6 +529,9 @@ md5_file (filename, resblock, binary) /* Initialize the computation context. */ init (&ctx); + len[0] = 0; + len[1] = 0; + /* Iterate over full file contents. */ while (1) { -- 2.47.3