diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-12-24 03:58:44 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-12-24 03:58:44 +0000 |
commit | dc32152dc051923e322fc251aaa2dbd5e54c0fbf (patch) | |
tree | ba3b94d89370a486e7c2ba48d9e22245155c20ff | |
parent | Update ChangeLog (diff) | |
download | w3m-dc32152dc051923e322fc251aaa2dbd5e54c0fbf.tar.gz w3m-dc32152dc051923e322fc251aaa2dbd5e54c0fbf.zip |
Prevent invalid form_update_line() call in formUpdateBuffer()
Bug-Debian: https://github.com/tats/w3m/issues/82
-rw-r--r-- | form.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -490,7 +490,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 || spos < 0 || epos < 0) + if (a->start.line != a->end.line || spos > epos || epos >= l->len || + spos < 0 || epos < 0 || COLPOS(l, epos) < col) break; pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col, rows > 1, |