Commit 13750c0f authored by hybrid's avatar hybrid

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-e03cc46cb475
parent 13d10077
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment