Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/13#issuecomment-242981906
This commit is contained in:
4
form.c
4
form.c
@@ -483,8 +483,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
|
|||||||
spos = a->start.pos;
|
spos = a->start.pos;
|
||||||
epos = a->end.pos;
|
epos = a->end.pos;
|
||||||
}
|
}
|
||||||
if (a->start.line != a->end.line || spos > epos || epos > l->len)
|
if (a->start.line != a->end.line || spos > epos || epos >= l->len)
|
||||||
epos = spos;
|
break;
|
||||||
pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,
|
pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,
|
||||||
rows > 1,
|
rows > 1,
|
||||||
form->type == FORM_INPUT_PASSWORD);
|
form->type == FORM_INPUT_PASSWORD);
|
||||||
|
Reference in New Issue
Block a user