Skip to content

Commit

Permalink
Fix rahash2 -B behavior
Browse files Browse the repository at this point in the history
Previously `rahash2 -B` always printed an extra block at the end, which
matched the checksum of an empty file.

The line causing the bug has been left in the sources commented out, at
least for now, in case this causes some other regression.
  • Loading branch information
jukuisma committed Sep 23, 2024
1 parent 7a5b81f commit f911a29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libr/main/rahash2.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ static int do_hash(RahashOptions *ro, const char *file, const char *algo, RIO *i
}
do_hash_internal (ctx, ro, hashbit, buf, nsize, pj, rad, 1);
}
do_hash_internal (ctx, ro, hashbit, NULL, 0, pj, rad, 1);
// Commented out to fix issue #23371
// do_hash_internal (ctx, ro, hashbit, NULL, 0, pj, rad, 1);
ro->from = ofrom;
ro->to = oto;
}
Expand Down

0 comments on commit f911a29

Please # to comment.