From 24c860a7285c5874ebe480f00c9a1e240567c94b Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 18 Mar 2019 16:50:16 +0100 Subject: Add a check to cc4group_uncompressGroup that should always fail, but may be helpful for debugging a problem with the windows build --- src/cc4group.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3-54-g00ecf