From 05fd14006d0ee5991f207d2f98a1a9ab0b4060fb Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 26 Mar 2022 18:46:01 +0100 Subject: Remove dead code from chacha_ECRYPT_encrypt_bytes (Coverity) --- src/Setup/SelfExtract.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Setup') 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 @@ -595,6 +595,14 @@ 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; -- cgit v1.2.3