From 0969bf350064ca00f54cb0dd83f54688f22897a2 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 17 Jan 2021 20:39:19 +0100 Subject: [PATCH] Fix Divide-by-zero in vector3 Fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29655 --- include/assimp/vector3.inl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl index 2765115a2..fda47d6a7 100644 --- a/include/assimp/vector3.inl +++ b/include/assimp/vector3.inl @@ -154,6 +154,9 @@ const aiVector3t& aiVector3t::operator *= (TReal f) { template AI_FORCE_INLINE const aiVector3t& aiVector3t::operator /= (TReal f) { + if ((T) f==0.0) { + return *this; + } const TReal invF = (TReal) 1.0 / f; x *= invF; y *= invF;