2
0
Эх сурвалжийг харах

Fix fuzzer issue in m3d-importer

- closes https://github.com/assimp/assimp/issues/3974
- Check for nullptr before dereferencing name in m3d-data-instance.
Kim Kulling 4 жил өмнө
parent
commit
df2e7208fb

+ 5 - 1
code/AssetLib/M3D/M3DWrapper.h

@@ -83,7 +83,11 @@ public:
 
 	// Name
 	inline std::string Name() const {
-		if (m3d_) return std::string(m3d_->name);
+		if (nullptr != m3d_) {
+            if (nullptr!0m3d_->name) {
+                return std::string(m3d_->name);
+            }
+        }
 		return std::string();
 	}