From 7854acb3a8a65f1ec3d30aca09a5cb93a7812e2d Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sun, 21 Sep 2003 02:18:26 +0000 Subject: [PATCH] Fix handling of large files. --- ChangeLog | 4 ++++ debian/changelog | 1 + utils/md5sum.c | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99a4d14d..0237cfaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 20 21:17:45 CDT 2003 Adam Heath + + * utils/md5sum.c: Fix handling of large files. + Sat Sep 20 20:42:35 CDT 2003 Adam Heath * man/* diff --git a/debian/changelog b/debian/changelog index 78119e67..8241e83c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -49,6 +49,7 @@ dpkg (1.10.16) unstable; urgency=low * Rune Schjellerup : Fix Danish translation of(was missing the leading space): " does not appear to be available\n" Closes: #192972 + * Fix md5sum when handling large files. Closes: #162691 -- Adam Heath UNRELEASED diff --git a/utils/md5sum.c b/utils/md5sum.c index 5b6b9392..18d80092 100644 --- a/utils/md5sum.c +++ b/utils/md5sum.c @@ -196,7 +196,8 @@ that is printed on stdout by this program when it generates digests.\n"), stderr int mdfile(int fd, unsigned char **digest) { - ssize_t ret = fd_md5(fd, digest, -1, _("mdfile")); + ssize_t ret; + while ((ret = fd_md5(fd, digest, 100 * 1024 * 1024, _("mdfile"))) >= 0); if ( ret >= 0 ) return 0; else -- 2.39.5