diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-12-10 07:38:44 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-12-10 07:38:44 +0000 |
commit | e0efc127ff20cbeb931847af1c9b353056340fbd (patch) | |
tree | 2abc8b1838732ee790101b162d1ff52fb3bd8924 /form.c | |
parent | Update ChangeLog (diff) | |
download | w3m-e0efc127ff20cbeb931847af1c9b353056340fbd.tar.gz w3m-e0efc127ff20cbeb931847af1c9b353056340fbd.zip |
Prevent overflow beyond the end of string in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/78
Diffstat (limited to 'form.c')
-rw-r--r-- | form.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -388,7 +388,7 @@ form_update_line(Line *line, char **str, int spos, int epos, int width, prop[pos] = effect | PC_ASCII; pos++; } - if (newline) { + if (p < q && newline) { if (!FoldTextarea) { while (*p && *p != '\r' && *p != '\n') p++; |