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
F157998105: D54544.id.diff
Wed, May 27, 8:08 AM
Unknown Object (File)
Tue, May 26, 8:45 AM
Unknown Object (File)
Thu, May 14, 3:19 PM
Unknown Object (File)
Thu, May 14, 3:19 PM
Unknown Object (File)
Thu, May 14, 1:13 PM
Unknown Object (File)
Thu, May 14, 4:18 AM
Unknown Object (File)
Mon, May 11, 9:11 AM
Unknown Object (File)
Sun, May 3, 3:37 PM
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