Skip to content

Commit

Permalink
Prevent segfault for formUpdateBuffer
Browse files Browse the repository at this point in the history
Bug-Debian: #13 (comment)
  • Loading branch information
tats committed Aug 29, 2016
1 parent 6445eb8 commit 7b88478
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions form.c
Expand Up @@ -483,8 +483,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
spos = a->start.pos;
epos = a->end.pos;
}
if (a->start.line != a->end.line || spos > epos || epos > l->len)
epos = spos;
if (a->start.line != a->end.line || spos > epos || epos >= l->len)
break;
pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,
rows > 1,
form->type == FORM_INPUT_PASSWORD);
Expand Down

0 comments on commit 7b88478

Please sign in to comment.