Ver código fonte

Fix segfault in md5sum if the file being checked doesn't exist.

Adam Heath 24 anos atrás
pai
commit
7a76faa4a7
3 arquivos alterados com 10 adições e 2 exclusões
  1. 5 0
      ChangeLog
  2. 3 0
      debian/changelog
  3. 2 2
      utils/md5sum.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Thu Aug 22 23:01:53 CDT 2002 Adam Heath <doogie@debian.org>
+
+  * utils/md5sum.c: Fix segfault in md5sum if the file being checked
+    doesn't exist.
+
 Thu Aug 22 22:59:54 CDT 2002 Adam Heath <doogie@debian.org>
  
   * version-nr, debian/changelog: Modified for 1.10.5.

+ 3 - 0
debian/changelog

@@ -1,5 +1,8 @@
 dpkg (1.10.5) unstable; urgency=low
 
+  * Fix segfault in md5sum if the file being checked doesn't exist.
+    Closes: #154503.
+
  -- Adam Heath <doogie@debian.org>  UNRELEASED
 
 dpkg (1.10.4) unstable; urgency=low

+ 2 - 2
utils/md5sum.c

@@ -267,11 +267,11 @@ do_check(FILE *chkf)
 			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)