diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-12-17 15:44:36 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2017-01-06 13:18:11 +0000 |
commit | e12f581c69a6b58a7b35350fdc1c78aaab1df90b (patch) | |
tree | e85533d5af088c12bb045f40a95ec6571b208849 | |
parent | Prevent overflow beyond the end of string for wtf to wcs macros (diff) | |
download | w3m-e12f581c69a6b58a7b35350fdc1c78aaab1df90b.tar.gz w3m-e12f581c69a6b58a7b35350fdc1c78aaab1df90b.zip |
Prevent infinite loop in feed_textarea()
Bug-Debian: https://github.com/tats/w3m/issues/85
Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=7a2675b4a5680d44645e72c4ec1258746a6e1b66
-rw-r--r-- | file.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4076,7 +4076,9 @@ feed_textarea(char *str) Strcat_charp(textarea_str[n_textarea], "\r\n"); str++; } - else if (*str != '\r') + else if (*str == '\r') + str++; + else Strcat_char(textarea_str[n_textarea], *(str++)); } } |