Revert "Prevent overflow beyond the end of string in proc_mchar()"
This reverts commit 512ed467d1.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user