Introduction
Introduction Statistics Contact Development Disclaimer Help
Catch invalid cursor positions - scroll - scrollbackbuffer program for st
git clone git://git.suckless.org/scroll
Log
Files
Refs
README
LICENSE
---
commit a4faed60e37174f43dce47e099a8b55b1f1a5556
parent 129f09a92636f53610b2dd5d1e02ced0ff765615
Author: Jochen Sprickerhof <[email protected]>
Date: Fri, 17 Apr 2020 23:33:34 +0200
Catch invalid cursor positions
Diffstat:
M scroll.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
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.