freebsd-dev/sys/teken
Ed Schouten 9a71fa376b Don't truncate cursor arithmetic to 16 bits.
When updating the row number when the cursor position escape sequence is
issued, we should make sure to store the intermediate result in a 32-bit
integer. If we fail to do this, the cursor may be set above the origin
region, which is bad.

This could cause libteken to crash when INVARIANTS is enabled, due to
the strict set of assertions that libteken has.

PR:		202540
Reported by:	kcwu csie org
MFC after:	1 month
2015-08-21 06:30:13 +00:00
..
demo Add missing 'static' keyword to keep build at WARNS=6 happy. 2015-08-15 08:29:13 +00:00
libteken mdoc: improvements to SEE ALSO. 2014-12-27 07:07:37 +00:00
stress
gensequences
sequences
teken_scs.h
teken_subr_compat.h
teken_subr.h Don't truncate cursor arithmetic to 16 bits. 2015-08-21 06:30:13 +00:00
teken_wcwidth.h
teken.c Pick UINT_MAX / 100 as an upperbound. 2015-08-16 13:59:11 +00:00
teken.h Extend libteken to support CJK fullwidth characters. 2013-12-20 21:31:50 +00:00