scroll

scrollbackbuffer program for st
git clone git://git.suckless.org/scroll
Log | Files | Refs | README

commit a4faed60e37174f43dce47e099a8b55b1f1a5556
parent 129f09a92636f53610b2dd5d1e02ced0ff765615
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date:   Fri, 17 Apr 2020 23:33:34 +0200

Catch invalid cursor positions

Diffstat:
Mscroll.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/scroll.c b/scroll.c @@ -232,6 +232,9 @@ getcursorposition(int *x, int *y) if (sscanf(input, "\033[%d;%dR", x, y) != 2) die("parsing cursor position"); + + if (x <= 0 || y <= 0) + die("invalid cursor position"); } void