summaryrefslogtreecommitdiffstats
path: root/src/network/access/qdecompresshelper_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qdecompresshelper_p.h')
-rw-r--r--src/network/access/qdecompresshelper_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/access/qdecompresshelper_p.h b/src/network/access/qdecompresshelper_p.h
index 6514e7d418..4e66581022 100644
--- a/src/network/access/qdecompresshelper_p.h
+++ b/src/network/access/qdecompresshelper_p.h
@@ -91,10 +91,14 @@ public:
void clear();
+ void setArchiveBombDetectionEnabled(bool enable);
+
static bool isSupportedEncoding(const QByteArray &encoding);
static QByteArrayList acceptedEncoding();
private:
+ bool isPotentialArchiveBomb() const;
+
bool countInternal();
bool countInternal(const QByteArray &data);
bool countInternal(const QByteDataBuffer &buffer);
@@ -113,6 +117,11 @@ private:
std::unique_ptr<QDecompressHelper> countHelper;
qint64 uncompressedBytes = 0;
+ // Used for calculating the ratio
+ bool archiveBombDetectionEnabled = true;
+ qint64 totalUncompressedBytes = 0;
+ qint64 totalCompressedBytes = 0;
+
ContentEncoding contentEncoding = None;
void *decoderPointer = nullptr;