Page MenuHomeFreeBSD

diff: Don't treat null characters like carriage returns in readhash().
ClosedPublic

Authored by jhb on Sep 29 2022, 10:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 10, 12:56 AM
Unknown Object (File)
Mon, Mar 9, 2:11 PM
Unknown Object (File)
Thu, Mar 5, 2:54 PM
Unknown Object (File)
Sat, Feb 28, 2:59 AM
Unknown Object (File)
Thu, Feb 19, 6:32 AM
Unknown Object (File)
Tue, Feb 17, 11:21 AM
Unknown Object (File)
Feb 8 2026, 10:49 PM
Unknown Object (File)
Feb 7 2026, 8:32 PM
Subscribers

Details

Summary

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
Fixes: 3cbf98e2bee9 diff: read whole files to determine if they are ASCII text

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable