From 6381826d1b62c53b2886f4342c46c31e1de0db03 Mon Sep 17 00:00:00 2001 From: Dv4L Date: Sun, 19 Jul 2020 16:31:52 +0200 Subject: [PATCH] More fixes to image decryption check. --- src/Components/Modules/Zones.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Zones.cpp b/src/Components/Modules/Zones.cpp index 970ef4f0..7afeecb4 100644 --- a/src/Components/Modules/Zones.cpp +++ b/src/Components/Modules/Zones.cpp @@ -2908,11 +2908,12 @@ namespace Components // check if file should be skipped auto skipFile = false; - if (!strncmp(&file[strlen(file) - 5], ".iwi", 4)) + + if (strlen(file) > 5 && ((strncmp(&file[strlen(file) - 4], ".iwi", 4) != 0))) { skipFile = true; } - else if (memcmp(&fileBuffer[0], "IWi", 4)) + else if (readSize >= 3 && (!memcmp(&fileBuffer[0], "IWi", 3))) { skipFile = true; }