aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-17 15:44:36 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-12-17 15:44:36 +0000
commit7a2675b4a5680d44645e72c4ec1258746a6e1b66 (patch)
tree206c0d03d11155f7cfb0d44c750b5505d713c92c /file.c
parentRevert "Prevent overflow beyond the end of string in form_update_line()" (diff)
downloadw3m-7a2675b4a5680d44645e72c4ec1258746a6e1b66.tar.gz
w3m-7a2675b4a5680d44645e72c4ec1258746a6e1b66.zip
Prevent infinite loop in feed_textarea()
Bug-Debian: https://github.com/tats/w3m/issues/85
Diffstat (limited to '')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 91fcfad..97287ab 100644
--- a/file.c
+++ b/file.c
@@ -4093,7 +4093,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++));
}
}