Fixed a core dump in bmp loader and added an array check in b3d loader.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@968 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
13d10077a3
commit
13750c0f40
|
@ -569,6 +569,9 @@ bool CB3DMeshFileLoader::readChunkTRIS(CSkinnedMesh::SJoint *InJoint, scene::SSk
|
|||
|
||||
for(s32 i=0; i<3; ++i)
|
||||
{
|
||||
if ((u32)vertex_id[i] >= AnimatedVertices_VertexID.size())
|
||||
return false;
|
||||
|
||||
if (AnimatedVertices_VertexID[ vertex_id[i] ] != -1)
|
||||
{
|
||||
if ( AnimatedVertices_BufferID[ vertex_id[i] ] != (s32)MeshBufferID ) //If this vertex is linked in a different meshbuffer
|
||||
|
|
|
@ -257,7 +257,7 @@ IImage* CImageLoaderBMP::loadImage(irr::io::IReadFile* file) const
|
|||
long pos = file->getPos();
|
||||
s32 paletteSize = (header.BitmapDataOffset - pos) / 4;
|
||||
|
||||
s32* paletteData;
|
||||
s32* paletteData = 0;
|
||||
if (paletteSize)
|
||||
{
|
||||
paletteData = new s32[paletteSize];
|
||||
|
|
Loading…
Reference in New Issue