------------------------------------------------------------ revno: 3285 committer: poy <p...@123gen.com> 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);
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp