| 5f4f00ad | 13-Oct-2023 |
Christos Margiolis <[email protected]> |
teken: fix style in teken_wcwidth.h
Reviewed by: bojan.novkovic_fer.hr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42164
(cherry picked from commit 90367ba750bcbf3f9ac460
teken: fix style in teken_wcwidth.h
Reviewed by: bojan.novkovic_fer.hr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42164
(cherry picked from commit 90367ba750bcbf3f9ac4609c3ec8df4ab95a22af)
show more ...
|
| 72a8e373 | 13-Oct-2023 |
Bojan Novković <[email protected]> |
tty/teken: fix UTF8 sequence validation logic
This patch fixes UTF-8 sequence validation logic in teken_utf8_bytes_to_codepoint() and fixes fallback behaviour in ttydisc_rubchar() when an invalid UT
tty/teken: fix UTF8 sequence validation logic
This patch fixes UTF-8 sequence validation logic in teken_utf8_bytes_to_codepoint() and fixes fallback behaviour in ttydisc_rubchar() when an invalid UTF8 sequence is encountered. The code previously used __bitcount() to extract sequence length information from the leading byte. However, this assumption breaks for certain code points that have additional bits set in the first half of the leading byte (e.g. Cyrillic characters). This lead to incorrect behaviour when deleting those characters using backspaces. The code now checks the number of consecutive set bits in the leading byte starting from the MSB, as per RFC 3629.
Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42147
(cherry picked from commit 2fed1c579c52d63b72fc08ffcc652ba0183f9254)
show more ...
|
| dbe34ab6 | 07-Oct-2023 |
Christos Margiolis <[email protected]> |
teken: use __bitcount() instead of bitcount()
The use of bitcount() triggered a build error because it couldn't be located. __bitcount() on the other hand is defined in sys/types.h, which is include
teken: use __bitcount() instead of bitcount()
The use of bitcount() triggered a build error because it couldn't be located. __bitcount() on the other hand is defined in sys/types.h, which is included in teken/teken.h.
MFC after: 2 weeks
(cherry picked from commit 6d3296f16a06bcaa49918799e683936711dcf9c9)
show more ...
|
| e06f6f73 | 19-Feb-2019 |
Ed Schouten <[email protected]> |
Place an upper bound on the number of iterations for REP.
Right now it's possible to invoke the REP escape sequence with a maximum of tens of millions of iterations. In practice, there is never any
Place an upper bound on the number of iterations for REP.
Right now it's possible to invoke the REP escape sequence with a maximum of tens of millions of iterations. In practice, there is never any need to do this. Calling it more frequently than the number of cells in the terminal hardly makes any sense. By placing a limit on it, we can prevent users from exhausting resources in inside the terminal emulator.
As support for this escape sequence is not present in any of the stable branches, there is no need to MFC.
Reported by: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11255
show more ...
|