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
index 8cd9b80..a1c07a9 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3834,7 +3834,8 @@
(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;