forked from aniani/vim
patch 7.4.812
Problem: Gcc sanitizer complains about using a NULL pointer to memmove(). Solution: Only call memmove when there is something to move. (Vittorio Zecca)
This commit is contained in:
parent
204b93f958
commit
fbd302ff38
@ -3834,7 +3834,8 @@ ml_add_stack(buf)
|
||||
(buf->b_ml.ml_stack_size + STACK_INCR));
|
||||
if (newstack == NULL)
|
||||
return -1;
|
||||
mch_memmove(newstack, buf->b_ml.ml_stack,
|
||||
if (top > 0)
|
||||
mch_memmove(newstack, buf->b_ml.ml_stack,
|
||||
(size_t)top * sizeof(infoptr_T));
|
||||
vim_free(buf->b_ml.ml_stack);
|
||||
buf->b_ml.ml_stack = newstack;
|
||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
812,
|
||||
/**/
|
||||
811,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user