From 844d814710dfdc87afcd625c0b09692ced686705 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sat, 13 Mar 2010 16:21:20 +0000 Subject: [PATCH] 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 --- code/MDLMaterialLoader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp index 0db2cabb0..eef7b18f6 100644 --- a/code/MDLMaterialLoader.cpp +++ b/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; }