aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-13 08:30:55 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-13 08:33:53 +0000
commita59a35211c63f12951b6266646081b08488b10ea (patch)
treecd85bdc02dc6648f48344d34db99faeb0a7141f1 /file.c
parentUpdate ChangeLog (diff)
downloadw3m-a59a35211c63f12951b6266646081b08488b10ea.tar.gz
w3m-a59a35211c63f12951b6266646081b08488b10ea.zip
Prevent null pointer dereference in HTMLlineproc2body for textarea_int
Bug-Debian: https://github.com/tats/w3m/issues/32#issuecomment-260170163
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index f5b160f..b84a51a 100644
--- a/file.c
+++ b/file.c
@@ -6044,7 +6044,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
n_textarea = -1;
break;
case HTML_N_TEXTAREA_INT:
- if (n_textarea >= 0) {
+ if (a_textarea && n_textarea >= 0) {
FormItemList *item =
(FormItemList *)a_textarea[n_textarea]->url;
item->init_value = item->value =