# HG changeset patch # User Bram Moolenaar # Date 1439051026 -7200 # Node ID c0a23e04c929b9eb6cf996d202e5ec51d0120528 # Parent e86ada5d3fa02a307117ff40a6d1fbd0f27f82ef 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) diff --git a/src/memline.c b/src/memline.c --- a/src/memline.c +++ b/src/memline.c @@ -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; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 812, +/**/ 811, /**/ 810,