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>
This commit is contained in:
parent
d3a47e14e5
commit
fff818fe87
3 changed files with 15 additions and 3 deletions
|
|
@ -67,6 +67,9 @@ _string(Image *dst, Point pt, Image *src, Point sp, Font *f, char *s, Rune *r, i
|
|||
Font *def;
|
||||
Subfont *sf;
|
||||
|
||||
if(len < 0)
|
||||
sysfatal("libdraw: _string len=%d", len);
|
||||
|
||||
if(s == nil){
|
||||
s = "";
|
||||
sptr = nil;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue