From 6bf33f9fc2fc6fd55b4fee9094138bb498f3ad96 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 9 Dec 2018 18:56:04 +0100 Subject: [PATCH] stop coverity warning (realloc). --- src/attributes/key.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/attributes/key.c b/src/attributes/key.c index 66af66b89..ac4dbb4d5 100644 --- a/src/attributes/key.c +++ b/src/attributes/key.c @@ -260,6 +260,7 @@ static int *keys_update(int *base, int key, int val) ptrdiff_t diff = kv - base; sz = keys_size(n + 1); base = realloc(base, (sz * 2 + 1) * sizeof(int)); + if (!base) abort(); kv = base + diff; } base[0] = n + 1;