]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
diff: Don't treat null characters like carriage returns in readhash().
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 16 Nov 2022 03:16:50 +0000 (19:16 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 16 Nov 2022 03:16:50 +0000 (19:16 -0800)
commit4e0771714d6192119dcf7553b921bf88866d8925
tree7927239247c3030d98a404924316f3c092c7db7e
parent325ba120558e9ccfa9bb876c20d9c1a4463930e9
diff: Don't treat null characters like carriage returns in readhash().

The implicit fall-through in the !D_FORCEASCII case caused null
characters to be treated as carriage returns honoring the D_STRIPCR,
D_FOLDBLANKS, and D_IGNOREBLANKS flags.

Reported by: GCC -Wimplicit-fallthrough
Reviewed by: bapt
Fixes:   3cbf98e2bee9 diff: read whole files to determine if they are ASCII text
Differential Revision: https://reviews.freebsd.org/D36813
usr.bin/diff/diffreg.c