mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/74717: FP: NULL Pointer Dereference
dynamic_buffer_ensure() allocates buf->data; add an assert to make this clear to coverity.
This commit is contained in:
parent
4e28e1aeb6
commit
0891cb2db8
@ -268,6 +268,7 @@ static int shell(const char *cmd,
|
|||||||
static void dynamic_buffer_ensure(DynamicBuffer *buf, size_t desired)
|
static void dynamic_buffer_ensure(DynamicBuffer *buf, size_t desired)
|
||||||
{
|
{
|
||||||
if (buf->cap >= desired) {
|
if (buf->cap >= desired) {
|
||||||
|
assert(buf->data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user