mirror of
https://github.com/sheumann/hush.git
synced 2025-01-10 16:29:44 +00:00
chsum: fix
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
7d4e7a27af
commit
48b6f59e19
@ -38,6 +38,7 @@ int cksum_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
|
|
||||||
#define read_buf bb_common_bufsiz1
|
#define read_buf bb_common_bufsiz1
|
||||||
while ((bytes_read = safe_read(fd, read_buf, sizeof(read_buf))) > 0) {
|
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);
|
crc = crc32_block_endian1(crc, read_buf, bytes_read, crc32_table);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user