aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-15 13:55:23 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-12-15 13:55:23 +0000
commit107810c145b3279bb657759587025d3b501a968c (patch)
tree74ae3f3d7b65bfe91cd3d3203a965aa735277df0
parentRevert "Prevent overflow beyond the end of string in visible_length()" (diff)
downloadw3m-107810c145b3279bb657759587025d3b501a968c.tar.gz
w3m-107810c145b3279bb657759587025d3b501a968c.zip
Revert "Prevent overflow beyond the end of string in proc_mchar()"
This reverts commit 512ed467d12615f5ef40d0d28272e5662d8438ea.
Diffstat (limited to '')
-rw-r--r--file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/file.c b/file.c
index 7d227da..c618ad7 100644
--- a/file.c
+++ b/file.c
@@ -2603,8 +2603,6 @@ static void
proc_mchar(struct readbuffer *obuf, int pre_mode,
int width, char **str, Lineprop mode)
{
- size_t len;
-
check_breakpoint(obuf, pre_mode, *str);
obuf->pos += width;
Strcat_charp_n(obuf->line, *str, get_mclen(*str));
@@ -2613,10 +2611,7 @@ proc_mchar(struct readbuffer *obuf, int pre_mode,
if (**str != ' ')
obuf->prev_ctype = mode;
}
- len = get_mclen(*str);
- if (len > strlen(*str))
- len = strlen(*str);
- (*str) += len;
+ (*str) += get_mclen(*str);
obuf->flag |= RB_NFLUSHED;
}