153083/2 Buffer not null terminated
parent
07ec476b7d
commit
8e9c0235d3
|
@ -1557,7 +1557,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
|
|||
} else {
|
||||
pcNode->mName.length = ::strlen(szBuffer);
|
||||
}
|
||||
::strncpy(pcNode->mName.data,szBuffer,MAXLEN);
|
||||
::strncpy(pcNode->mName.data,szBuffer,MAXLEN-1);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -641,7 +641,7 @@ void SMDImporter::ComputeAbsoluteBoneTransformations()
|
|||
bone.mOffsetMatrix.Inverse();
|
||||
}
|
||||
}
|
||||
|
||||
\
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// create output materials
|
||||
void SMDImporter::CreateOutputMaterials()
|
||||
|
@ -660,7 +660,7 @@ void SMDImporter::CreateOutputMaterials()
|
|||
|
||||
if (aszTextures[iMat].length())
|
||||
{
|
||||
::strncpy(szName.data, aszTextures[iMat].c_str(),MAXLEN );
|
||||
::strncpy(szName.data, aszTextures[iMat].c_str(),MAXLEN-1);
|
||||
szName.length = aszTextures[iMat].length();
|
||||
pcMat->AddProperty(&szName,AI_MATKEY_TEXTURE_DIFFUSE(0));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue