aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-06 15:35:42 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-19 12:24:17 +0000
commiteb635ae4fa298a798e7fe282b79be1ac8f348a0b (patch)
tree9e0a792d6872d8b8a635cb960c2b8835e14976ec /file.c
parentPrevent deref null pointer in renderCoTable() (diff)
downloadw3m-eb635ae4fa298a798e7fe282b79be1ac8f348a0b.tar.gz
w3m-eb635ae4fa298a798e7fe282b79be1ac8f348a0b.zip
Prevent null pointer dereference in HTMLlineproc2body
Bug-Debian: https://github.com/tats/w3m/issues/32 Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=c6c39973e7d336854e9a2d43119d1220b36e2035 Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=a59a35211c63f12951b6266646081b08488b10ea
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 5be29e7..32ad98a 100644
--- a/file.c
+++ b/file.c
@@ -6010,7 +6010,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 =
@@ -6028,7 +6028,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
n_select = -1;
break;
case HTML_N_SELECT_INT:
- if (n_select >= 0) {
+ if (a_select && n_select >= 0) {
FormItemList *item =
(FormItemList *)a_select[n_select]->url;
item->select_option = select_option[n_select].first;