aboutsummaryrefslogtreecommitdiff
path: root/src/libframe
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2014-12-01 20:15:52 -0500
committerRuss Cox <rsc@swtch.com>2014-12-02 01:18:40 +0000
commitfff818fe878ca5edfbac85b15e77ada2acb8ea0f (patch)
tree1c528d7e620547fa26704577af3330188154ba46 /src/libframe
parentd3a47e14e5ebf7a4d8ca8c9a3dfe748b93d3663a (diff)
downloadplan9port-fff818fe878ca5edfbac85b15e77ada2acb8ea0f.tar.gz
plan9port-fff818fe878ca5edfbac85b15e77ada2acb8ea0f.tar.bz2
plan9port-fff818fe878ca5edfbac85b15e77ada2acb8ea0f.zip
libdraw, libframe, acme: fix, guard against inverted range in textsetselect
Credit to Roi Martin <jroi.martin@gmail.com> for noticing that libdraw was being passed a negative string length and for finding the sequence of keystrokes that make acme do it reproducibly. Change-Id: If3f3d04a25c506175f740d3e887d5d83b5cd1bfe Reviewed-on: https://plan9port-review.googlesource.com/1092 Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src/libframe')
-rw-r--r--src/libframe/frdraw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libframe/frdraw.c b/src/libframe/frdraw.c
index 2a3a95e0..05a45fe2 100644
--- a/src/libframe/frdraw.c
+++ b/src/libframe/frdraw.c
@@ -62,6 +62,9 @@ frdrawsel0(Frame *f, Point pt, ulong p0, ulong p1, Image *back, Image *text)
Point qt;
uint p;
char *ptr;
+
+ if(p0 > p1)
+ sysfatal("libframe: frdrawsel0 p0=%lud > p1=%lud", p0, p1);
p = 0;
b = f->box;