diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-08 15:02:24 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-08-08 15:02:24 +0000 |
commit | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 (patch) | |
tree | 47338802031194957f0359bc2c55380b00f378fa /file.c | |
parent | Update ChangeLog (diff) | |
download | w3m-59b91cd8e30c86f23476fa81ae005cabff49ebb6.tar.gz w3m-59b91cd8e30c86f23476fa81ae005cabff49ebb6.zip |
Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7
Diffstat (limited to '')
-rw-r--r-- | file.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -3639,9 +3639,10 @@ process_input(struct parsed_tag *tag) Strcat(tmp, getLinkNumberStr(0)); Strcat_char(tmp, '('); } - Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s " + Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=\"%s\" " "name=\"%s\" width=%d maxlength=%d value=\"%s\"", - cur_hseq++, cur_form_id, p, html_quote(r), size, i, qq)); + cur_hseq++, cur_form_id, html_quote(p), + html_quote(r), size, i, qq)); if (x) Strcat_charp(tmp, " checked"); if (y) @@ -3789,9 +3790,10 @@ process_button(struct parsed_tag *tag) } /* Strcat_charp(tmp, "<pre_int>"); */ - Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s " + Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=\"%s\" " "name=\"%s\" value=\"%s\">", - cur_hseq++, cur_form_id, p, html_quote(r), qq)); + cur_hseq++, cur_form_id, html_quote(p), + html_quote(r), qq)); return tmp; } |