Skip to content

Commit 7fdc83b

Browse files
committed
Prevent invalid columnPos() call in formUpdateBuffer()
Bug-Debian: #89
1 parent 1fd08f3 commit 7fdc83b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: form.c

+2
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
482482
rows = form->rows ? form->rows : 1;
483483
col = COLPOS(l, a->start.pos);
484484
for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) {
485+
if (l == NULL)
486+
break;
485487
if (rows > 1) {
486488
pos = columnPos(l, col);
487489
a = retrieveAnchor(buf->formitem, l->linenumber, pos);

0 commit comments

Comments
 (0)