ColladaParser: check values length (#5462)
* ColladaParser: check values length fixes: #4286 * Refactor calculation of size for data --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
@@ -357,6 +357,14 @@ TEST_F(utColladaImportExport, exporterUniqueIdsTest) {
|
||||
ImportAsNames(outFileNamed, scene);
|
||||
}
|
||||
|
||||
// This file is invalid, we just want to ensure that the importer is not crashing
|
||||
// This was reported as GH#4286. The "count" parameter in "Cube-mesh-positions-array" is too small.
|
||||
TEST_F(utColladaImportExport, parseInvalid4286) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/invalid/box_nested_animation_4286.dae", 0);
|
||||
EXPECT_EQ(nullptr, scene);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
class utColladaZaeImportExport : public AbstractImportExportBase {
|
||||
|
||||
Reference in New Issue
Block a user