]> jfr.im git - irc/hexchat/hexchat.git/commit
xtext: Fix overflow on long lines
authorPatrick Griffis <redacted>
Fri, 30 Oct 2015 04:57:25 +0000 (00:57 -0400)
committerPatrick Griffis <redacted>
Fri, 30 Oct 2015 05:22:13 +0000 (01:22 -0400)
commitc8539b93fe65977ee507b473e9dd62a1cc7bec53
treef764c526e07affd1d773f3b9e8766a2a4a0b298a
parent1e914347d700de3d3d8f6c7947a97160bb866e51
xtext: Fix overflow on long lines

xtext keeps a static buffer and uses it for various things
and asserts that every text entry is < 4096. It does
this check on gtk_xtext_append*() except it does the check only on
the right half of text when indent is enabled.

This overflow caused corruption in the xtext struct
changing the url check functions making hovering
with the mouse do 'undefined' things.

In the long term this should be removed for a dynamically
allocated buffer so no arbitrary size limit exists and
text gets cut off.

Fixes #1465
Fixes #1186
Fixes #1206
src/fe-gtk/xtext.c