mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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:
@@ -3834,6 +3834,7 @@ ml_add_stack(buf)
|
|||||||
(buf->b_ml.ml_stack_size + STACK_INCR));
|
(buf->b_ml.ml_stack_size + STACK_INCR));
|
||||||
if (newstack == NULL)
|
if (newstack == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
if (top > 0)
|
||||||
mch_memmove(newstack, buf->b_ml.ml_stack,
|
mch_memmove(newstack, buf->b_ml.ml_stack,
|
||||||
(size_t)top * sizeof(infoptr_T));
|
(size_t)top * sizeof(infoptr_T));
|
||||||
vim_free(buf->b_ml.ml_stack);
|
vim_free(buf->b_ml.ml_stack);
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
812,
|
||||||
/**/
|
/**/
|
||||||
811,
|
811,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user