From: Jerome St-Louis Date: Sat, 4 Apr 2015 17:35:34 +0000 (-0400) Subject: ecere/EARArchive: Fixed junk data saved if out of range compression option is passed X-Git-Tag: 0.44.12~28 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=5738d769f84a433449556940d7603b407aa49db2 ecere/EARArchive: Fixed junk data saved if out of range compression option is passed --- diff --git a/ecere/src/sys/EARArchive.ec b/ecere/src/sys/EARArchive.ec index 245c308..6b59c2e 100644 --- a/ecere/src/sys/EARArchive.ec +++ b/ecere/src/sys/EARArchive.ec @@ -1123,6 +1123,7 @@ class EARArchiveDir : ArchiveDir compressed = new byte[destLen]; if(compressed) { + if(compression > 9 || compression < 0) compression = 9; compress2(compressed, &destLen, uncompressed, entry.size, compression); entry.cSize = (FileSize)destLen; }