VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/SelfExtract.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Setup/SelfExtract.c')
-rw-r--r--src/Setup/SelfExtract.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c
index d5dd3d2c..c672c364 100644
--- a/src/Setup/SelfExtract.c
+++ b/src/Setup/SelfExtract.c
@@ -594,8 +594,16 @@ BOOL SelfExtractInMemory (wchar_t *path, BOOL bSkipCountCheck)
if (compressedLen != fileDataEndPos - fileDataStartPos - 8 + 1)
{
Error ("DIST_PACKAGE_CORRUPTED", NULL);
+ return FALSE;
+ }
+
+ // Test to make Coverity happy. It will always be false
+ if (uncompressedLen >= (INT_MAX - 524288))
+ {
+ Error ("DIST_PACKAGE_CORRUPTED", NULL);
+ return FALSE;
}
decompressedDataLen = uncompressedLen;
DecompressedData = malloc (decompressedDataLen);