From 0891cb2db8e913456aefafe81ae906399d2c41e1 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 16 Dec 2014 00:56:44 -0500 Subject: [PATCH] coverity/74717: FP: NULL Pointer Dereference dynamic_buffer_ensure() allocates buf->data; add an assert to make this clear to coverity. --- src/nvim/os/shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index c450e24284..d0f8442768 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -268,6 +268,7 @@ static int shell(const char *cmd, static void dynamic_buffer_ensure(DynamicBuffer *buf, size_t desired) { if (buf->cap >= desired) { + assert(buf->data); return; }