diff options
| author | Tatsuya Kinoshita <tats@debian.org> | 2016-08-15 11:07:56 +0000 | 
|---|---|---|
| committer | Tatsuya Kinoshita <tats@debian.org> | 2016-11-19 05:11:41 +0000 | 
| commit | f065a49616b8104973e30a2b031102d6b6e11080 (patch) | |
| tree | b15c95ffc0e1f8f86c1f52a8844d7c3ef785b22d | |
| parent | Prevent segfault with malformed input type (diff) | |
| download | w3m-f065a49616b8104973e30a2b031102d6b6e11080.tar.gz w3m-f065a49616b8104973e30a2b031102d6b6e11080.zip | |
Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/9 [CVE-2016-9423]
Bug-Debian: https://github.com/tats/w3m/issues/10 [CVE-2016-9431]
Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=9f0bdcfdf061db3520bd1f112bdc5e83acdec4be
| -rw-r--r-- | form.c | 2 | 
1 files changed, 2 insertions, 0 deletions
| @@ -477,6 +477,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)  		spos = a->start.pos;  		epos = a->end.pos;  	    } +	    if (a->start.line != a->end.line || spos > epos) +		epos = spos;  	    pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,  				   rows > 1,  				   form->type == FORM_INPUT_PASSWORD); | 
