diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-04-07 14:41:03 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-04-07 14:41:03 +0200 |
| commit | 7d43668afe09b1bf5f45870939b24b0bf8fbe9e3 (patch) | |
| tree | e71fcd9b08ff04db881ebe1dddc8c48695aef59b /src/cc4group.c | |
| parent | 0be23b38b118d9a36ab8ac57462c9566277cc215 (diff) | |
| download | cc4group-7d43668afe09b1bf5f45870939b24b0bf8fbe9e3.tar.gz cc4group-7d43668afe09b1bf5f45870939b24b0bf8fbe9e3.zip | |
Fix wrong reporting of garbage data at the end of the group
Diffstat (limited to 'src/cc4group.c')
| -rw-r--r-- | src/cc4group.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cc4group.c b/src/cc4group.c index a664fe3..d376873 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -721,8 +721,9 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback goto ret; } - if(strm.avail_in > 0 || ret != Z_STREAM_END) + if(strm.avail_in > 0) { + // NOTE: This may miss additional garbage data at the end if the read callback happens to read exactly the right amount of data SET_MALFORMED_MESSAGE_ERROR("The group contents are read completely but more data is left to read"); goto ret; } |
