diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-03-18 16:50:16 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-03-18 16:50:16 +0100 |
| commit | 24c860a7285c5874ebe480f00c9a1e240567c94b (patch) | |
| tree | bb5f4e71457a2371f5d8abfab5351cef90ab6e85 /src/cc4group.c | |
| parent | ecd14ab39b0a44d246f4d50507dcc28d8abc1787 (diff) | |
| download | cc4group-24c860a7285c5874ebe480f00c9a1e240567c94b.tar.gz cc4group-24c860a7285c5874ebe480f00c9a1e240567c94b.zip | |
Add a check to cc4group_uncompressGroup that should always fail, but may be helpful for debugging a problem with the windows build
Diffstat (limited to 'src/cc4group.c')
| -rw-r--r-- | src/cc4group.c | 6 |
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) { |
