linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #06832
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3285: minizip already checks the compression method
------------------------------------------------------------
revno: 3285
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2013-05-03 19:07:01 +0200
message:
minizip already checks the compression method
modified:
dcpp/Archive.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/Archive.cpp'
--- dcpp/Archive.cpp 2013-05-02 21:52:03 +0000
+++ dcpp/Archive.cpp 2013-05-03 17:07:01 +0000
@@ -48,14 +48,8 @@
if(check(unzGoToFirstFile(file)) != UNZ_OK) { return; }
do {
- unz_file_info info;
char pathBuf[MAX_PATH];
- if(check(unzGetCurrentFileInfo(file, &info, pathBuf, MAX_PATH, nullptr, 0, nullptr, 0)) != UNZ_OK) { continue; }
-
- if(info.compression_method != 0 /* uncompressed */ && info.compression_method != 8 /* DEFLATE */) {
- throw Exception(_("Invalid archive"));
- }
-
+ if(check(unzGetCurrentFileInfo(file, nullptr, pathBuf, MAX_PATH, nullptr, 0, nullptr, 0)) != UNZ_OK) { continue; }
if(check(unzOpenCurrentFile(file)) != UNZ_OK) { continue; }
string path_out(pathBuf);