diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-17 15:16:18 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-11-19 05:11:41 +0000 |
commit | f59dac7e6d9f0aad961c5686fe832d95ec1e7b6c (patch) | |
tree | 9c20621c50cb5aa16658d583e065096b75ba22d1 /file.c | |
parent | Prevent segfault with incorrect form_int fid (diff) | |
download | w3m-f59dac7e6d9f0aad961c5686fe832d95ec1e7b6c.tar.gz w3m-f59dac7e6d9f0aad961c5686fe832d95ec1e7b6c.zip |
Prevent segfault with incorrect button type
Bug-Debian: https://github.com/tats/w3m/issues/17 [CVE-2016-9437]
Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=67be73b03a5ad581e331ec97cb275cd8a52719ed
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3756,6 +3756,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: |