diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-17 15:16:18 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-08-17 15:21:08 +0000 |
commit | 67be73b03a5ad581e331ec97cb275cd8a52719ed (patch) | |
tree | e5cdb3f7d194e790d28bf15bc268e01fbbd75461 /file.c | |
parent | Prevent segfault with incorrect form_int fid (diff) | |
download | w3m-67be73b03a5ad581e331ec97cb275cd8a52719ed.tar.gz w3m-67be73b03a5ad581e331ec97cb275cd8a52719ed.zip |
Prevent segfault with incorrect button type
Bug-Debian: https://github.com/tats/w3m/issues/17
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3773,6 +3773,17 @@ process_button(struct parsed_tag *tag) if (v == FORM_UNKNOWN) return NULL; + switch (v) { + case FORM_INPUT_SUBMIT: + case FORM_INPUT_BUTTON: + case FORM_INPUT_RESET: + break; + default: + p = "submit"; + v = FORM_INPUT_SUBMIT; + break; + } + if (!q) { switch (v) { case FORM_INPUT_SUBMIT: |