aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Bellard <pascal.bellard@ads-lu.com>2011-03-11 23:40:27 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-11 23:40:27 +0100
commit48b6f59e19613d497148ecf1033ce75c74baa8a7 (patch)
treea991276f562c33eebcd187b417bf1cc13968440b
parent7d4e7a27aface177b6f6120132cdd6fd7fd371f9 (diff)
downloadbusybox-48b6f59e19613d497148ecf1033ce75c74baa8a7.tar.gz
chsum: fix
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/cksum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index 7a37e6add..53fb87a78 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -38,6 +38,7 @@ int cksum_main(int argc UNUSED_PARAM, char **argv)
#define read_buf bb_common_bufsiz1
while ((bytes_read = safe_read(fd, read_buf, sizeof(read_buf))) > 0) {
+ length += bytes_read;
crc = crc32_block_endian1(crc, read_buf, bytes_read, crc32_table);
}
close(fd);