diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2017-12-26 21:43:52 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2017-12-26 21:43:52 +0000 |
commit | 7fdc83b0364005a0b5ed869230dd81752ba022e8 (patch) | |
tree | 608bd33f93aca3db2514317558531f9c7b4a5db2 /form.c | |
parent | Typo fix in fusage() (diff) | |
download | w3m-7fdc83b0364005a0b5ed869230dd81752ba022e8.tar.gz w3m-7fdc83b0364005a0b5ed869230dd81752ba022e8.zip |
Prevent invalid columnPos() call in formUpdateBuffer()
Bug-Debian: https://github.com/tats/w3m/issues/89
Diffstat (limited to '')
-rw-r--r-- | form.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -482,6 +482,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form) rows = form->rows ? form->rows : 1; col = COLPOS(l, a->start.pos); for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) { + if (l == NULL) + break; if (rows > 1) { pos = columnPos(l, col); a = retrieveAnchor(buf->formitem, l->linenumber, pos); |