Prevent overflow beyond the end of string in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/78
This commit is contained in:
2
form.c
2
form.c
@@ -388,7 +388,7 @@ form_update_line(Line *line, char **str, int spos, int epos, int width,
|
|||||||
prop[pos] = effect | PC_ASCII;
|
prop[pos] = effect | PC_ASCII;
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
if (newline) {
|
if (p < q && newline) {
|
||||||
if (!FoldTextarea) {
|
if (!FoldTextarea) {
|
||||||
while (*p && *p != '\r' && *p != '\n')
|
while (*p && *p != '\r' && *p != '\n')
|
||||||
p++;
|
p++;
|
||||||
|
Reference in New Issue
Block a user