freebsd-src/usr.bin/hexdump/tests/d_hexdump_UCvflag_bug118723.out
Xin LI d101656818 hexdump: Partial lines cannot be repetitions of earlier lines.
When checking for repetitions of earlier lines, we compare the
first nread bytes of the line against the saved line. However,
when we read a partial line, it should never be treated as a
repetition of an earlier line, even if the first bytes match.

This change fixes a bug where a partial line could be
incorrectly identified as a repetition of an earlier line.

Reported-by:	Mark Adler <madler@alumni.caltech.edu>
PR:		118723
Reviewed-by:	emaste
MFC-after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D40471
2023-06-08 18:39:05 -07:00

5 lines
238 B
Plaintext

00000000 61 62 63 64 65 66 67 0a 30 31 32 33 34 35 36 0a |abcdefg.0123456.|
00000010 61 62 63 64 65 66 67 0a 30 31 32 33 34 35 36 0a |abcdefg.0123456.|
00000020 61 62 63 64 65 66 67 0a |abcdefg.|
00000028