aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/md5_sha1_sum.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 3b389cb6b..0e57673f1 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -300,12 +300,10 @@ int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv)
300 char *filename_ptr; 300 char *filename_ptr;
301 301
302 count_total++; 302 count_total++;
303 filename_ptr = strstr(line, " "); 303 filename_ptr = strchr(line, ' ');
304 /* handle format for binary checksums */ 304 if (filename_ptr == NULL
305 if (filename_ptr == NULL) { 305 || (filename_ptr[1] != ' ' && filename_ptr[1] != '*')
306 filename_ptr = strstr(line, " *"); 306 ) {
307 }
308 if (filename_ptr == NULL) {
309 if (flags & FLAG_WARN) { 307 if (flags & FLAG_WARN) {
310 bb_simple_error_msg("invalid format"); 308 bb_simple_error_msg("invalid format");
311 } 309 }