mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
fixed GH #2723: Access violation when trying to decompress .zip file with unsupported compression method.
This commit is contained in:
@@ -85,6 +85,8 @@ public:
|
||||
|
||||
bool isEncrypted() const;
|
||||
|
||||
bool hasSupportedCompressionMethod() const;
|
||||
|
||||
const Poco::DateTime& lastModifiedAt() const;
|
||||
|
||||
Poco::UInt32 getCRC() const;
|
||||
@@ -367,6 +369,13 @@ inline bool ZipLocalFileHeader::isEncrypted() const
|
||||
}
|
||||
|
||||
|
||||
inline bool ZipLocalFileHeader::hasSupportedCompressionMethod() const
|
||||
{
|
||||
ZipCommon::CompressionMethod method = getCompressionMethod();
|
||||
return method == ZipCommon::CM_DEFLATE || method == ZipCommon::CM_STORE;
|
||||
}
|
||||
|
||||
|
||||
inline void ZipLocalFileHeader::setEncryption(bool val)
|
||||
{
|
||||
if (val)
|
||||
|
||||
Reference in New Issue
Block a user