diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-03-18 16:27:03 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-03-18 16:27:03 +0100 |
| commit | d734fc748de81f3d01151ce79cc14b940a799d20 (patch) | |
| tree | 279f609797f2d6beb6eb90b81af8860fc0758a30 | |
| parent | 2f3cb04eb1cb05c62c0a7afb7566c23e1418cf39 (diff) | |
| download | cc4group-d734fc748de81f3d01151ce79cc14b940a799d20.tar.gz cc4group-d734fc748de81f3d01151ce79cc14b940a799d20.zip | |
Add error checking to the return value of the tmp memory strategy in cc4group_uncompressGroup
| -rw-r--r-- | src/cc4group.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |
