diff --git a/.travis.yml b/.travis.yml
index ff9318bb4..66523f6a3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,6 @@
before_install:
- sudo apt-get update -qq
+ - sudo apt-get install cmake
- sudo apt-get install cmake python3
- if [ $LINUX ]; then sudo apt-get install -qq freeglut3-dev libxmu-dev libxi-dev ; fi
- echo -e "#ifndef A_R_H_INC\n#define A_R_H_INC\n#define GitVersion ${TRAVIS_JOB_ID}\n#define GitBranch \"${TRAVIS_BRANCH}\"\n#endif // A_R_H_INC" > revision.h
@@ -18,6 +19,7 @@ branches:
env:
global:
+ - secure: "lZ7pHQvl5dpZWzBQAaIMf0wqrvtcZ4wiZKeIZjf83TEsflW8+z0uTpIuN30ZV6Glth/Sq1OhLnTP5+N57fZU/1ebA5twHdvP4bS5CIUUg71/CXQZNl36xeaqvxsG/xRrdpKOsPdjAOsQ9KPTQulsX43XDLS7CasMiLvYOpqKcPc="
- PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
matrix:
- LINUX=1 TRAVIS_NO_EXPORT=YES ENABLE_COVERALLS=ON
@@ -52,3 +54,11 @@ after_success:
- lcov --list coverage.info
- coveralls-lcov --source-encoding=ISO-8859-1 --repo-token=${COVERALLS_TOKEN} coverage.info
+addons:
+ coverity_scan:
+ project:
+ name: "assimp/assimp"
+ notification_email: kim.kulling@googlemail.com
+ build_command_prepend: "cmake"
+ build_command: "make"
+ branch_pattern: coverity_scan
diff --git a/appveyor.yml b/appveyor.yml
index e33202409..59929cc33 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -40,3 +40,4 @@ after_build:
artifacts:
- path: assimp.7z
name: assimp_lib
+
diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp
index 68388235f..a3810a3a1 100644
--- a/code/BlenderLoader.cpp
+++ b/code/BlenderLoader.cpp
@@ -105,6 +105,8 @@ BlenderImporter::~BlenderImporter()
delete modifier_cache;
}
+static const char* Tokens[] = { "BLENDER" };
+
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
@@ -116,8 +118,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
else if ((!extension.length() || checkSig) && pIOHandler) {
// note: this won't catch compressed files
- const char* tokens[] = {"BLENDER"};
- return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
+ return SearchFileHeaderForToken(pIOHandler,pFile, Tokens,1);
}
return false;
}
@@ -171,7 +172,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
char magic[8] = {0};
stream->Read(magic,7,1);
- if (strcmp(magic,"BLENDER")) {
+ if (strcmp(magic, Tokens[0] )) {
// Check for presence of the gzip header. If yes, assume it is a
// compressed blend file and try uncompressing it, else fail. This is to
// avoid uncompressing random files which our loader might end up with.
@@ -346,8 +347,9 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
if (cur->object) {
if(!cur->object->parent) {
no_parents.push_back(cur->object.get());
+ } else {
+ conv.objects.insert( cur->object.get() );
}
- else conv.objects.insert(cur->object.get());
}
}
for (std::shared_ptr cur = in.basact; cur; cur = cur->next) {
@@ -430,8 +432,9 @@ void BlenderImporter::ResolveImage(aiMaterial* out, const Material* mat, const M
// so we can extract the file extension from it.
const size_t nlen = strlen( img->name );
const char* s = img->name+nlen, *e = s;
-
- while (s >= img->name && *s != '.')--s;
+ while ( s >= img->name && *s != '.' ) {
+ --s;
+ }
tex->achFormatHint[0] = s+1>e ? '\0' : ::tolower( s[1] );
tex->achFormatHint[1] = s+2>e ? '\0' : ::tolower( s[2] );
@@ -448,8 +451,7 @@ void BlenderImporter::ResolveImage(aiMaterial* out, const Material* mat, const M
tex->pcData = reinterpret_cast(ch);
LogInfo("Reading embedded texture, original file was "+std::string(img->name));
- }
- else {
+ } else {
name = aiString( img->name );
}
diff --git a/code/BlenderScene.cpp b/code/BlenderScene.cpp
index 70b0c108f..e522fad68 100644
--- a/code/BlenderScene.cpp
+++ b/code/BlenderScene.cpp
@@ -805,5 +805,5 @@ void DNA::RegisterConverters() {
converters["Image"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert );
}
-
#endif // ASSIMP_BUILD_NO_BLEND_IMPORTER
+
diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp
index 365d7fe65..d266a6037 100644
--- a/code/FBXConverter.cpp
+++ b/code/FBXConverter.cpp
@@ -1394,9 +1394,9 @@ unsigned int Converter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, cons
// allocate tangents, binormals.
const std::vector& tangents = mesh.GetTangents();
const std::vector* binormals = &mesh.GetBinormals();
+ std::vector tempBinormals;
if ( tangents.size() ) {
- std::vector tempBinormals;
if ( !binormals->size() ) {
if ( normals.size() ) {
// XXX this computes the binormals for the entire mesh, not only
diff --git a/code/HMPLoader.cpp b/code/HMPLoader.cpp
index 560852691..788286e12 100644
--- a/code/HMPLoader.cpp
+++ b/code/HMPLoader.cpp
@@ -127,8 +127,7 @@ void HMPImporter::InternReadFile( const std::string& pFile,
throw DeadlyImportError( "HMP File is too small.");
// Allocate storage and copy the contents of the file to a memory buffer
- std::vector buffer(fileSize);
- mBuffer = &buffer[0];
+ mBuffer = new uint8_t[fileSize];
file->Read( (void*)mBuffer, 1, fileSize);
iFileSize = (unsigned int)fileSize;
@@ -174,7 +173,9 @@ void HMPImporter::InternReadFile( const std::string& pFile,
// Set the AI_SCENE_FLAGS_TERRAIN bit
pScene->mFlags |= AI_SCENE_FLAGS_TERRAIN;
- // File buffer destructs automatically now
+ delete[] mBuffer;
+ mBuffer= nullptr;
+
}
// ------------------------------------------------------------------------------------------------
@@ -449,11 +450,13 @@ void HMPImporter::ReadFirstSkin(unsigned int iNumSkins, const unsigned char* szC
// read the type of the skin ...
// sometimes we need to skip 12 bytes here, I don't know why ...
- uint32_t iType = *((uint32_t*)szCursor);szCursor += sizeof(uint32_t);
+ uint32_t iType = *((uint32_t*)szCursor);
+ szCursor += sizeof(uint32_t);
if (0 == iType)
{
szCursor += sizeof(uint32_t) * 2;
- iType = *((uint32_t*)szCursor);szCursor += sizeof(uint32_t);
+ iType = *((uint32_t*)szCursor);
+ szCursor += sizeof(uint32_t);
if (!iType)
throw DeadlyImportError("Unable to read HMP7 skin chunk");
diff --git a/code/IRRLoader.cpp b/code/IRRLoader.cpp
index 6e2a9a5b5..b7776abdc 100644
--- a/code/IRRLoader.cpp
+++ b/code/IRRLoader.cpp
@@ -269,14 +269,15 @@ void IRRImporter::CopyMaterial(std::vector& materials,
if (UINT_MAX == defMatIdx)
{
defMatIdx = (unsigned int)materials.size();
- aiMaterial* mat = new aiMaterial();
+ //TODO: add this materials to someone?
+ /*aiMaterial* mat = new aiMaterial();
aiString s;
s.Set(AI_DEFAULT_MATERIAL_NAME);
mat->AddProperty(&s,AI_MATKEY_NAME);
aiColor3D c(0.6f,0.6f,0.6f);
- mat->AddProperty(&c,1,AI_MATKEY_COLOR_DIFFUSE);
+ mat->AddProperty(&c,1,AI_MATKEY_COLOR_DIFFUSE);*/
}
mesh->mMaterialIndex = defMatIdx;
return;
diff --git a/code/IRRMeshLoader.cpp b/code/IRRMeshLoader.cpp
index a06449dca..853ead15f 100644
--- a/code/IRRMeshLoader.cpp
+++ b/code/IRRMeshLoader.cpp
@@ -116,14 +116,18 @@ const aiImporterDesc* IRRMeshImporter::GetInfo () const
return &desc;
}
-static void releaseMaterial( aiMaterial *mat ) {
- delete mat;
- mat = nullptr;
+static void releaseMaterial( aiMaterial **mat ) {
+ if(*mat!= nullptr) {
+ delete *mat;
+ *mat = nullptr;
+ }
}
-static void releaseMesh( aiMesh *mesh ) {
- delete mesh;
- mesh = nullptr;
+static void releaseMesh( aiMesh **mesh ) {
+ if (*mesh != nullptr){
+ delete *mesh;
+ *mesh = nullptr;
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -148,8 +152,8 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
meshes.reserve(5);
// temporary data - current mesh buffer
- aiMaterial* curMat = NULL;
- aiMesh* curMesh = NULL;
+ aiMaterial* curMat = nullptr;
+ aiMesh* curMesh = nullptr;
unsigned int curMatFlags = 0;
std::vector curVertices,curNormals,curTangents,curBitangents;
@@ -170,14 +174,14 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// end of previous buffer. A material and a mesh should be there
if ( !curMat || !curMesh) {
DefaultLogger::get()->error("IRRMESH: A buffer must contain a mesh and a material");
- releaseMaterial( curMat );
- releaseMesh( curMesh );
+ releaseMaterial( &curMat );
+ releaseMesh( &curMesh );
} else {
materials.push_back(curMat);
meshes.push_back(curMesh);
}
- curMat = NULL;
- curMesh = NULL;
+ curMat = nullptr;
+ curMesh = nullptr;
curVertices.clear();
curColors.clear();
@@ -192,7 +196,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
if (!ASSIMP_stricmp(reader->getNodeName(),"material")) {
if (curMat) {
DefaultLogger::get()->warn("IRRMESH: Only one material description per buffer, please");
- releaseMaterial( curMat );
+ releaseMaterial( &curMat );
}
curMat = ParseMaterial(curMatFlags);
}
@@ -204,8 +208,8 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// This is possible ... remove the mesh from the list and skip further reading
DefaultLogger::get()->warn("IRRMESH: Found mesh with zero vertices");
- releaseMaterial( curMat );
- releaseMesh( curMesh );
+ releaseMaterial( &curMat );
+ releaseMesh( &curMesh );
textMeaning = 0;
continue;
}
@@ -248,7 +252,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
vertexFormat = 2;
}
else if (ASSIMP_stricmp("standard", t)) {
- releaseMaterial( curMat );
+ releaseMaterial( &curMat );
DefaultLogger::get()->warn("IRRMESH: Unknown vertex format");
}
else vertexFormat = 0;
@@ -256,7 +260,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
else if (!ASSIMP_stricmp(reader->getNodeName(),"indices")) {
if (curVertices.empty() && curMat) {
- releaseMaterial( curMat );
+ releaseMaterial( &curMat );
throw DeadlyImportError("IRRMESH: indices must come after vertices");
}
@@ -272,10 +276,10 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
DefaultLogger::get()->warn("IRRMESH: Found mesh with zero indices");
// mesh - away
- releaseMesh( curMesh );
+ releaseMesh( &curMesh );
// material - away
- releaseMaterial( curMat );
+ releaseMaterial( &curMat );
textMeaning = 0;
continue;
@@ -487,8 +491,8 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
if (curMat || curMesh) {
if ( !curMat || !curMesh) {
DefaultLogger::get()->error("IRRMESH: A buffer must contain a mesh and a material");
- releaseMaterial( curMat );
- releaseMesh( curMesh );
+ releaseMaterial( &curMat );
+ releaseMesh( &curMesh );
}
else {
materials.push_back(curMat);
diff --git a/code/LWOLoader.cpp b/code/LWOLoader.cpp
index 222ec8e2c..df2cab7bc 100644
--- a/code/LWOLoader.cpp
+++ b/code/LWOLoader.cpp
@@ -1058,8 +1058,6 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
LWO::PointList& pointList = mCurLayer->mTempPoints;
LWO::ReferrerList& refList = mCurLayer->mPointReferrers;
- float temp[4];
-
const unsigned int numPoints = (unsigned int)pointList.size();
const unsigned int numFaces = (unsigned int)list.size();
@@ -1123,10 +1121,12 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
}
}
}
+
+ std::unique_ptr temp(new float[type]);
for (unsigned int l = 0; l < type;++l)
temp[l] = GetF4();
- DoRecursiveVMAPAssignment(base,type,idx, temp);
+ DoRecursiveVMAPAssignment(base,type,idx, temp.get());
mFileBuffer += diff;
}
}
diff --git a/code/MDLLoader.cpp b/code/MDLLoader.cpp
index ba5c4c32c..f82e7abfe 100644
--- a/code/MDLLoader.cpp
+++ b/code/MDLLoader.cpp
@@ -172,8 +172,7 @@ void MDLImporter::InternReadFile( const std::string& pFile,
}
// Allocate storage and copy the contents of the file to a memory buffer
- std::vector buffer(iFileSize+1);
- mBuffer = &buffer[0];
+ mBuffer =new unsigned char[iFileSize+1];
file->Read( (void*)mBuffer, 1, iFileSize);
// Append a binary zero to the end of the buffer.
@@ -239,7 +238,8 @@ void MDLImporter::InternReadFile( const std::string& pFile,
0.f,0.f,1.f,0.f,0.f,-1.f,0.f,0.f,0.f,0.f,0.f,1.f);
// delete the file buffer and cleanup
- AI_DEBUG_INVALIDATE_PTR(mBuffer);
+ delete [] mBuffer;
+ mBuffer= nullptr;
AI_DEBUG_INVALIDATE_PTR(pIOHandler);
AI_DEBUG_INVALIDATE_PTR(pScene);
}
@@ -1557,7 +1557,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
} else {
pcNode->mName.length = ::strlen(szBuffer);
}
- ::strcpy(pcNode->mName.data,szBuffer);
+ ::strncpy(pcNode->mName.data,szBuffer,MAXLEN-1);
++p;
}
}
diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp
index a84afad22..3425d7b09 100644
--- a/code/MDLMaterialLoader.cpp
+++ b/code/MDLMaterialLoader.cpp
@@ -488,7 +488,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
unsigned int iWidth,
unsigned int iHeight)
{
- aiTexture* pcNew = NULL;
+ aiTexture* pcNew = nullptr;
// get the type of the skin
unsigned int iMasked = (unsigned int)(iType & 0xF);
@@ -522,7 +522,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
memcpy(pcNew->pcData,szCurrent,pcNew->mWidth);
szCurrent += iWidth;
}
- if (0x7 == iMasked)
+ else if (0x7 == iMasked)
{
// ***** REFERENCE TO EXTERNAL FILE *****
if (1 != iHeight)
@@ -546,6 +546,9 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
else if (iMasked || !iType || (iType && iWidth && iHeight))
{
// ***** STANDARD COLOR TEXTURE *****
+ if(pcNew!= nullptr)
+ delete pcNew;
+
pcNew = new aiTexture();
if (!iHeight || !iWidth)
{
diff --git a/code/MakeVerboseFormat.cpp b/code/MakeVerboseFormat.cpp
index df3b97a4d..be68bf3d6 100644
--- a/code/MakeVerboseFormat.cpp
+++ b/code/MakeVerboseFormat.cpp
@@ -168,6 +168,8 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh* pcMesh)
}
}
+
+
// build output vertex weights
for (unsigned int i = 0;i < pcMesh->mNumBones;++i)
{
@@ -177,11 +179,11 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh* pcMesh)
aiVertexWeight *weightToCopy = &( newWeights[i][0] );
memcpy(pcMesh->mBones[i]->mWeights, weightToCopy,
sizeof(aiVertexWeight) * newWeights[i].size());
- delete[] newWeights;
} else {
pcMesh->mBones[i]->mWeights = NULL;
}
}
+ delete[] newWeights;
// delete the old members
delete[] pcMesh->mVertices;
diff --git a/code/NDOLoader.cpp b/code/NDOLoader.cpp
index f04eb5345..de682e260 100644
--- a/code/NDOLoader.cpp
+++ b/code/NDOLoader.cpp
@@ -257,7 +257,8 @@ void NDOImporter::InternReadFile( const std::string& pFile,
}
aiMesh* mesh = new aiMesh();
- aiFace* faces = mesh->mFaces = new aiFace[mesh->mNumFaces=face_table.size()];
+ mesh->mNumFaces=face_table.size();
+ aiFace* faces = mesh->mFaces = new aiFace[mesh->mNumFaces];
vertices.clear();
vertices.reserve(4 * face_table.size()); // arbitrarily chosen
@@ -298,7 +299,8 @@ void NDOImporter::InternReadFile( const std::string& pFile,
pScene->mMeshes[pScene->mNumMeshes] = mesh;
(nd->mMeshes = new unsigned int[nd->mNumMeshes=1])[0]=pScene->mNumMeshes++;
- }
+ }else
+ delete mesh;
}
}
diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp
index 2db9f15e7..b06fa8c96 100644
--- a/code/SMDLoader.cpp
+++ b/code/SMDLoader.cpp
@@ -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())
{
- ::strcpy(szName.data, aszTextures[iMat].c_str() );
+ ::strncpy(szName.data, aszTextures[iMat].c_str(),MAXLEN-1);
szName.length = aszTextures[iMat].length();
pcMat->AddProperty(&szName,AI_MATKEY_TEXTURE_DIFFUSE(0));
}
diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp
index 8d5e75d3e..e3a46a1da 100644
--- a/code/XFileExporter.cpp
+++ b/code/XFileExporter.cpp
@@ -513,7 +513,7 @@ std::string XFileExporter::toXFileString(aiString &name)
return str;
}
-void XFileExporter::writePath(aiString path)
+void XFileExporter::writePath(const aiString &path)
{
std::string str = std::string(path.C_Str());
BaseImporter::ConvertUTF8toISO8859_1(str);
diff --git a/code/XFileExporter.h b/code/XFileExporter.h
index c33de3347..389c7010c 100644
--- a/code/XFileExporter.h
+++ b/code/XFileExporter.h
@@ -107,7 +107,7 @@ protected:
const ExportProperties* mProperties;
/// write a path
- void writePath(aiString path);
+ void writePath(const aiString &path);
/// The IOSystem for output
IOSystem* mIOSystem;
diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h
index 8d6912f32..803426b3f 100644
--- a/include/assimp/metadata.h
+++ b/include/assimp/metadata.h
@@ -95,6 +95,7 @@ struct aiMetadataEntry
* Helper functions to get the aiType enum entry for a type
*/
// -------------------------------------------------------------------------------
+
inline aiMetadataType GetAiType( bool ) { return AI_BOOL; }
inline aiMetadataType GetAiType( int32_t ) { return AI_INT32; }
inline aiMetadataType GetAiType( uint64_t ) { return AI_UINT64; }
diff --git a/scripts/BlenderImporter/BlenderScene.cpp.template b/scripts/BlenderImporter/BlenderScene.cpp.template
index ce645eac0..1dda00919 100644
--- a/scripts/BlenderImporter/BlenderScene.cpp.template
+++ b/scripts/BlenderImporter/BlenderScene.cpp.template
@@ -2,7 +2,7 @@
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
-Copyright (c) 2006-2010, ASSIMP Development Team
+Copyright (c) 2006-2016, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
diff --git a/scripts/BlenderImporter/BlenderSceneGen.h.template b/scripts/BlenderImporter/BlenderSceneGen.h.template
index a1bb22bd2..562b5bb72 100644
--- a/scripts/BlenderImporter/BlenderSceneGen.h.template
+++ b/scripts/BlenderImporter/BlenderSceneGen.h.template
@@ -2,7 +2,7 @@
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
-Copyright (c) 2006-2010, ASSIMP Development Team
+Copyright (c) 2006-2016, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
diff --git a/scripts/BlenderImporter/genblenddna.py b/scripts/BlenderImporter/genblenddna.py
index d9086cc0b..484f01a5d 100644
--- a/scripts/BlenderImporter/genblenddna.py
+++ b/scripts/BlenderImporter/genblenddna.py
@@ -5,7 +5,7 @@
# Open Asset Import Library (ASSIMP)
# ---------------------------------------------------------------------------
#
-# Copyright (c) 2006-2013, ASSIMP Development Team
+# Copyright (c) 2006-2016, ASSIMP Development Team
#
# All rights reserved.
#
diff --git a/test/regression/db.zip b/test/regression/db.zip
deleted file mode 100644
index 6f2b170e7..000000000
Binary files a/test/regression/db.zip and /dev/null differ
diff --git a/test/unit/utBlenderIntermediate.cpp b/test/unit/utBlenderIntermediate.cpp
index 0bf40936b..eea30e202 100644
--- a/test/unit/utBlenderIntermediate.cpp
+++ b/test/unit/utBlenderIntermediate.cpp
@@ -48,10 +48,13 @@ class BlenderIntermediateTest : public ::testing::Test {
// empty
};
+#define NAME_1 "name1"
+#define NAME_2 "name2"
+
TEST_F( BlenderIntermediateTest,ConversionData_ObjectCompareTest ) {
Object obj1, obj2;
- strncpy( obj1.id.name, "name1", 5 );
- strncpy( obj2.id.name, "name2", 5 );
+ strncpy( obj1.id.name, NAME_1, sizeof(NAME_1) );
+ strncpy( obj2.id.name, NAME_2, sizeof(NAME_2) );
Blender::ObjectCompare cmp_false;
bool res( cmp_false( &obj1, &obj2 ) );
EXPECT_FALSE( res );
diff --git a/tools/coverity/assimp_modeling.cpp b/tools/coverity/assimp_modeling.cpp
new file mode 100644
index 000000000..cc09284f4
--- /dev/null
+++ b/tools/coverity/assimp_modeling.cpp
@@ -0,0 +1,40 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2015, assimp team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the
+ following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior
+ written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+//