History log of /freebsd-10-stable/sys/teken/teken_subr.h
Revision Date Author Comments
# 287776 14-Sep-2015 ed

MFC r286798 and r286827:

Stop parsing digits if the value already exceeds UINT_MAX / 100.

There is no need for us to support parsing values that are larger than
the maximum terminal window size. In this case that would be the maximum
of unsigned short.

The problem with parsing larger values is that they can cause integer
overflows when adjusting the cursor position, leading to all sorts of
failing assertions.

MFC r286981 and r287098:

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: 202326, 202540, 202612
Submitted by: kwcu csie org


# 262861 06-Mar-2014 jhb

MFC 259016,259019,259049,259071,259102,259110,259129,259130,259178,259179,
259203,259221,259261,259532,259615,259650,259651,259667,259680,259727,
259761,259772,259776,259777,259830,259882,259915,260160,260449,260450,
260688,260888,260953,261269,261547,261551,261552,261553,261585:
Merge the vt(4) driver (newcons) to stable/10.

Approved by: ray


# 287776 14-Sep-2015 ed

MFC r286798 and r286827:

Stop parsing digits if the value already exceeds UINT_MAX / 100.

There is no need for us to support parsing values that are larger than
the maximum terminal window size. In this case that would be the maximum
of unsigned short.

The problem with parsing larger values is that they can cause integer
overflows when adjusting the cursor position, leading to all sorts of
failing assertions.

MFC r286981 and r287098:

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: 202326, 202540, 202612
Submitted by: kwcu csie org


# 262861 06-Mar-2014 jhb

MFC 259016,259019,259049,259071,259102,259110,259129,259130,259178,259179,
259203,259221,259261,259532,259615,259650,259651,259667,259680,259727,
259761,259772,259776,259777,259830,259882,259915,260160,260449,260450,
260688,260888,260953,261269,261547,261551,261552,261553,261585:
Merge the vt(4) driver (newcons) to stable/10.

Approved by: ray