Przeglądaj źródła

Apply patch from Brian Carlson to fix #170953; don't print offending
data in md5sum, it may not be NULL terminated.

Scott James Remnant 22 lat temu
rodzic
commit
965650cff0
4 zmienionych plików z 11 dodań i 1 usunięć
  1. 5 0
      ChangeLog
  2. 1 0
      THANKS
  3. 1 0
      debian/changelog
  4. 4 1
      utils/md5sum.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Mon Mar  8 18:55:13 GMT 2004 Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
+
+  * utils/md5sum.c: Don't print offending lines as they may not be NULL
+  terminated.
+
 Mon Mar  8 18:34:16 GMT 2004 Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>
 
   * lib/parse.c, main/processarc.c: Store Architecture in the status file

+ 1 - 0
THANKS

@@ -3,6 +3,7 @@ Alberto Garcia <berto@gpul.org>
 Andrew Hobson <ahobson@eng.mindspring.net>
 Ben Collins <bcollins@debian.org>
 Branko Lankester
+Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
 Bruce Perens <bruce@pixar.com>
 Carl Streeter <streeter@cae.wisc.edu>
 Carlos Laviola <claviola@brfree.com.br>

+ 1 - 0
debian/changelog

@@ -10,6 +10,7 @@ dpkg (1.10.19) unstable; urgency=low
   * Fix dpkg-buildpackage when used with PGP.  Closes: #232916.
   * Update support for Debian FreeBSD.  Closes: #211566.
   * Store Architecture in the status file.  Closes: #228253.
+  * Don't print offending lines in md5sum.  Closes: #170953.
 
  -- Scott James Remnant <scott@netsplit.com>  UNRELEASED
 

+ 4 - 1
utils/md5sum.c

@@ -236,7 +236,10 @@ get_md5_line(FILE *fp, unsigned char *digest, char *file)
 	else if (*p == '*')
 		rc = 2;
 	else {
-		fprintf(stderr, _("%s: unrecognized line: %s"), progname, buf);
+		/* Don't print the buffer; we might be dealing with a
+		 * non-text file.
+		 */
+		fprintf(stderr, _("%s: unrecognized line\n"), progname);
 		return 0;
 	}
 	++p;