CB3DMeshFileLoader: add some bounds checks

This commit is contained in:
sfan5
2023-09-18 19:41:58 +02:00
parent 827710f74a
commit 64688f4490
2 changed files with 26 additions and 5 deletions

View File

@ -10,6 +10,7 @@
#pragma once
#include "SMaterial.h"
#include "irrMath.h"
namespace irr {
namespace scene {
@ -25,6 +26,7 @@ struct SB3dChunk
SB3dChunk(const SB3dChunkHeader& header, long sp)
: length(header.size+8), startposition(sp)
{
length = core::max_(length, 8);
name[0]=header.name[0];
name[1]=header.name[1];
name[2]=header.name[2];