JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Simplify tdeletechar and tinsertblank and fix memory corruption.
authornoname <noname@inventati.org>
Tue, 22 Apr 2014 22:08:13 +0000 (02:08 +0400)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Fri, 25 Apr 2014 15:17:48 +0000 (17:17 +0200)
commit80b32af794b659cb15745cfb2a19fce0829c42c7
tree3991d7b4a03f0eafda64222adb8b7dc1868cb48a
parent16ac85bf5422a7e925743f6134572d3ac1a25188
Simplify tdeletechar and tinsertblank and fix memory corruption.

Current CSI parsing code uses strtol to parse arguments and allows them
to be negative. Negative argument is not properly handled in tdeletechar
and tinsertblank and results in memory corruption in memmove.

Reproduce with printf '\e[-500@'

Patch also removes special handling for corner case and simplifies
the code.

Removed
term.dirty[term.c.y] = 1
because tclearregion sets dirty flag.
st.c