- while (get_line(check_file, inhash, filename, verbose)) {
- count++;
- if (!hash_file(&ctx, filename, calcsum, open_mode)) {
+ while (get_line
+ (check_file, inhash, filename, verbose, &expected_hash_size)) {
+ int error = 0;
+ if (expected_hash_size == 0) {
+ fprintf(stderr, "%s: invalid hash length\n", filename);
+ errors++;
+ count++;
+ continue;
+ }
+
+ if (!hash_file
+ (&ctx, filename, calcsum, open_mode, expected_hash_size)) {