diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-15 11:07:56 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-08-15 11:42:27 +0000 |
commit | 9f0bdcfdf061db3520bd1f112bdc5e83acdec4be (patch) | |
tree | e78ec9a80373529fa371d6fa7544c873965abb02 /form.c | |
parent | Update ChangeLog (diff) | |
download | w3m-9f0bdcfdf061db3520bd1f112bdc5e83acdec4be.tar.gz w3m-9f0bdcfdf061db3520bd1f112bdc5e83acdec4be.zip |
Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/9
Bug-Debian: https://github.com/tats/w3m/issues/10
Diffstat (limited to '')
-rw-r--r-- | form.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -477,6 +477,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 = spos; pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col, rows > 1, form->type == FORM_INPUT_PASSWORD); |