2
0
Эх сурвалжийг харах

Fix possible heap corruption in the MDL material loader.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@605 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 15 жил өмнө
parent
commit
844d814710

+ 4 - 1
code/MDLMaterialLoader.cpp

@@ -206,7 +206,10 @@ void MDLImporter::CreateTexture_3DGS_MDL4(const unsigned char* szData,
 			delete[] pc;
 		}
 	}
-	else delete pcNew;
+	else {
+		pcNew->pcData = NULL;
+		delete pcNew;
+	}
 	return;
 }