diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-17 12:10:30 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-08-17 12:10:30 +0000 |
commit | 807e8b7fbffca6dcaf5db40e35f05d05c5cf02d3 (patch) | |
tree | 3f87209456647ec269684747e08426009447953d /form.c | |
parent | Prevent negative array index for selectnumber and textareanumber (diff) | |
download | w3m-807e8b7fbffca6dcaf5db40e35f05d05c5cf02d3.tar.gz w3m-807e8b7fbffca6dcaf5db40e35f05d05c5cf02d3.zip |
Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/13
Diffstat (limited to 'form.c')
-rw-r--r-- | form.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -481,7 +481,7 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form) spos = a->start.pos; epos = a->end.pos; } - if (a->start.line != a->end.line || spos > epos) + if (a->start.line != a->end.line || spos > epos || epos > l->len) epos = spos; pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col, rows > 1, |