summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cc4group.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cc4group.c b/src/cc4group.c
index 5b7fe98..0a8a3bd 100644
--- a/src/cc4group.c
+++ b/src/cc4group.c
@@ -657,6 +657,12 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback
currentSize += uncompressedSize;
+ if(currentSize == 0)
+ {
+ SET_MESSAGE_ERROR("Bug: the computed size of the whole uncompressed group somehow turned out to be 0");
+ goto ret;
+ }
+
uncompressedData = cc4group_tmpMemoryStrategy(this, currentSize, &tmpCleanup);
if(uncompressedData == NULL)
{