Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7
This commit is contained in:
10
file.c
10
file.c
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user