aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-08-18 10:26:58 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-08-18 10:26:58 +0000
commit010b68580dc50ce183df11cc79721936ab5c4f25 (patch)
tree2c3e36e44801b7760bcad2c33cd2adec3b1dbfcf
parentPrevent segfault with incorrect button type (diff)
downloadw3m-010b68580dc50ce183df11cc79721936ab5c4f25.tar.gz
w3m-010b68580dc50ce183df11cc79721936ab5c4f25.zip
Prevent segfault with malformed input_alt
Bug-Debian: https://github.com/tats/w3m/issues/18
Diffstat (limited to '')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index ddc080f..de916bc 100644
--- a/file.c
+++ b/file.c
@@ -3025,9 +3025,9 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
tmp = Sprintf("<INPUT_ALT hseq=\"%d\" fid=\"%d\" name=\"%s\" type=\"%s\" value=\"%s\">",
obuf->input_alt.hseq,
obuf->input_alt.fid,
- obuf->input_alt.name->ptr,
- obuf->input_alt.type->ptr,
- obuf->input_alt.value->ptr);
+ obuf->input_alt.name ? obuf->input_alt.name->ptr : "",
+ obuf->input_alt.type ? obuf->input_alt.type->ptr : "",
+ obuf->input_alt.value ? obuf->input_alt.value->ptr : "");
push_tag(obuf, tmp->ptr, HTML_INPUT_ALT);
}
if (!hidden_bold && obuf->in_bold)