diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-16 00:56:44 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 03:21:00 -0500 |
commit | 0891cb2db8e913456aefafe81ae906399d2c41e1 (patch) | |
tree | 86c2deb6dc377f2886304cfc0903dfc735547df1 | |
parent | 4e28e1aeb6d931aad9b0521fac4b055083ae182b (diff) | |
download | rneovim-0891cb2db8e913456aefafe81ae906399d2c41e1.tar.gz rneovim-0891cb2db8e913456aefafe81ae906399d2c41e1.tar.bz2 rneovim-0891cb2db8e913456aefafe81ae906399d2c41e1.zip |
coverity/74717: FP: NULL Pointer Dereference
dynamic_buffer_ensure() allocates buf->data; add an assert to make this
clear to coverity.
-rw-r--r-- | src/nvim/os/shell.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |