tsm: screen: fix buffer-overflow when resizing and scrolling
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 30 Sep 2012 19:59:45 +0000 (21:59 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 30 Sep 2012 19:59:45 +0000 (21:59 +0200)
commit5347c626886eb6acb14d6bb350434083afc63417
tree53ad89eff666c8556c07ca041801912be8430fea
parentc43d1ca7221b8e745b61b9a3b8e71f7bf92fc244
tsm: screen: fix buffer-overflow when resizing and scrolling

We call screen_scroll_up() under special conditions when resizing. We
require it to allocate the lines with the new width even though we didn't
set it yet. Therefore, we need to set the width before calling it and then
adjust the height.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/tsm_screen.c