Page MenuHomeFreeBSD

ng_tty: avoid the sign extention of char
ClosedPublic

Authored by vexeduxr on Jan 5 2026, 11:37 PM.
Tags
None
Referenced Files
F172770647: D54544.diff
Sun, Sep 20, 9:15 PM
Unknown Object (File)
Sun, Sep 20, 8:30 AM
Unknown Object (File)
Thu, Sep 3, 10:44 PM
Unknown Object (File)
Aug 17 2026, 6:06 PM
Unknown Object (File)
Aug 11 2026, 4:57 PM
Unknown Object (File)
Aug 11 2026, 4:57 PM
Unknown Object (File)
Aug 9 2026, 12:11 PM
Unknown Object (File)
Aug 8 2026, 10:02 AM
Subscribers

Details

Summary

When c is compared to sc->hotchar, both undergo integer promotion, which
can lead to c being sign extended. Fix this by casting c to an unsigned
char.

Diff Detail

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