[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#154503: dpkg: md5sum segfaults



Package: dpkg
Version: 1.10.4
Severity: important

There is a problem with the md5sum utility provided by dpkg: if the file to
check does not exist then md5sum exits with a segfault.

The error is in dpkg-1.10.4/utils/md5sum.c::do_check(): file_digest is NULL if
the file does not exist and thus crashes the memcmp.

--- dpkg-1.10.4/utils/md5sum.c	2002-05-20 07:56:01.000000000 +0200
+++ dpkg-1.10.4x/utils/md5sum.c	2002-07-27 17:19:53.000000000 +0200
@@ -267,11 +267,11 @@
 			case 2:
 				fprintf(stderr, _("%s: can't open %s\n"), progname, filename);
 				ex = 2;
-				break;
+				continue;
 			case 3:
 				fprintf(stderr, _("%s: error reading %s\n"), progname, filename);
 				ex = 2;
-				break;
+				continue;
 		}
 		if (memcmp(chk_digest, file_digest, 32) != 0) {
 			if (verbose)

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux s41 2.4.19-rc3-ac3 #3 SMP Thu Jul 25 11:04:25 CEST 2002 i686 unknown unknown GNU/Linux

Versions of the packages dpkg depends on:
ii  dselect        1.10.4         a user tool to manage Debian packages
ii  libc6          2.2.5-12       GNU C Library: Shared libraries and Timezone


-- 
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: