MDL: Fix overflow check (#6047)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user