md5sum return value fix
Matthias Wenzel
busybox at mazzoo.de
Thu Oct 27 14:28:46 UTC 2005
"md5 has been broken" ... and fixed :)
without the fix below md5sum will always report a correct md5 on _any_
wrongly formattet input files.
In my application case it led to a integrity/security breach.
m
diff -Nur svn-orig/busybox/coreutils/md5_sha1_sum.c
svn/busybox/coreutils/md5_sha1_sum.c
--- svn-orig/busybox/coreutils/md5_sha1_sum.c 2005-10-27
14:47:45.000000000 +0200
+++ svn/busybox/coreutils/md5_sha1_sum.c 2005-10-27
14:59:34.000000000 +0200
@@ -121,6 +121,8 @@
if (flags & FLAG_WARN) {
bb_error_msg("Invalid format");
}
+ count_failed++;
+ return_value = EXIT_FAILURE;
free(line);
continue;
}
More information about the busybox
mailing list