mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 09:54:25 +00:00
cmp: fix -l width bug
Problem reported by Dave Odell (Bug#37558). * src/cmp.c (cmp): Treat negative ‘bytes’ as infinite, fixing a bug introduced in the 2019-08-27 patch that fixed Bug#35256.
This commit is contained in:
parent
8d26b1403e
commit
1a9db80899
@ -394,7 +394,8 @@ cmp (void)
|
||||
|
||||
if (comparison_type == type_all_diffs)
|
||||
{
|
||||
off_t byte_number_max = MIN (bytes, TYPE_MAXIMUM (off_t));
|
||||
off_t byte_number_max = (0 <= bytes && bytes <= TYPE_MAXIMUM (off_t)
|
||||
? bytes : TYPE_MAXIMUM (off_t));
|
||||
|
||||
for (f = 0; f < 2; f++)
|
||||
if (S_ISREG (stat_buf[f].st_mode))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user