From 4a8d16fc8d08206dd7142435054ee38ff41805b7 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 24 Aug 2016 19:05:31 +0900 Subject: Prevent segfault for formUpdateBuffer Bug-Debian: https://github.com/tats/w3m/issues/22 --- form.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'form.c') diff --git a/form.c b/form.c index 805505f..b56347b 100644 --- a/form.c +++ b/form.c @@ -461,6 +461,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form) #endif /* MENU_SELECT */ p = form->value->ptr; l = buf->currentLine; + if (!l) + break; if (form->type == FORM_TEXTAREA) { int n = a->y - buf->currentLine->linenumber; if (n > 0) -- cgit v1.2.3