Hello list,
md5sum with the -c option did not work on files with "\r\n" and "\r" line
endings.
A patch is attached.
With best regards,
Simon Hengel.
=== modified file 'src/md5sum.c'
--- src/md5sum.c 2008-04-16 15:51:12 +0000
+++ src/md5sum.c 2008-04-16 16:27:50 +0000
@@ -465,7 +465,12 @@
continue;
/* Remove any trailing newline. */
- if (line[line_length - 1] == '\n')
+ while (line_length &&
+ (
+ (line[line_length - 1] == '\n') ||
+ (line[line_length - 1] == '\r')
+ )
+ )
line[--line_length] = '\0';
if (! (split_3 (line, line_length, &hex_digest, &binary, &filename)
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils