From d734fc748de81f3d01151ce79cc14b940a799d20 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 18 Mar 2019 16:27:03 +0100 Subject: Add error checking to the return value of the tmp memory strategy in cc4group_uncompressGroup --- src/cc4group.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/cc4group.c b/src/cc4group.c index db0ea59..43a22b5 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -650,6 +650,10 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback currentSize += uncompressedSize; uncompressedData = cc4group_tmpMemoryStrategy(this, currentSize, &tmpCleanup); + if(uncompressedData == NULL) + { + goto ret; + } uint8_t* data = (uint8_t*)(uncompressedData) + sizeof(C4GroupHeader) + sizeof(C4GroupEntryCore) * header->Entries; -- cgit v1.2.3-54-g00ecf