summaryrefslogtreecommitdiffstats
diff options
authorKim Kulling <kimkulling@users.noreply.github.com>2025-03-12 23:40:38 +0100
committerGitHub <noreply@github.com>2025-03-12 23:40:38 +0100
commitab66a1674fcfac87aaba4c8b900b315ebc3e7dbd (patch)
treef887ae46c45fd7988112bea9df0d90ed6f0a6cb7
parent7f2c9d7b8843563f617312f7808e1d36e7ee9fde (diff)
MDL: Fix overflow checkupstream/kimkulling-patch-1
-rw-r--r--code/AssetLib/MDL/MDLLoader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/code/AssetLib/MDL/MDLLoader.cpp b/code/AssetLib/MDL/MDLLoader.cpp
index 6f9e0f200..30da65866 100644
--- a/code/AssetLib/MDL/MDLLoader.cpp
+++ b/code/AssetLib/MDL/MDLLoader.cpp
@@ -420,7 +420,7 @@ void MDLImporter::InternReadFile_Quake1() {
}
// go to the end of the skin section / the beginning of the next skin
bool overflow = false;
- if (pcHeader->skinwidth != 0 || pcHeader->skinheight != 0) {
+ if (pcHeader->skinwidth != 0 && pcHeader->skinheight != 0) {
if ((pcHeader->skinheight > INT_MAX / pcHeader->skinwidth) || (pcHeader->skinwidth > INT_MAX / pcHeader->skinheight)){
overflow = true;
}