Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-08-24 15:42:00 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-08-24 15:42:00 +0400
commit248e3d74a0382dcdf5baf19336ed97e98220fafc (patch)
treed2165e8f4fd557c2fdfdca3c8a0c2e1c62127727 /source/blender/freestyle/intern/geometry/BBox.h
parentaf1c274be72b8f42cb15463aebf3b513d1bdb3d4 (diff)
Fix for [#36374] Read unitialized memory in Freestyle.
A variable keeping a bounding box was referenced after it was flagged as empty.
Diffstat (limited to 'source/blender/freestyle/intern/geometry/BBox.h')
-rw-r--r--source/blender/freestyle/intern/geometry/BBox.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/geometry/BBox.h b/source/blender/freestyle/intern/geometry/BBox.h
index 794ceba48e7..afff36dec7b 100644
--- a/source/blender/freestyle/intern/geometry/BBox.h
+++ b/source/blender/freestyle/intern/geometry/BBox.h
@@ -28,6 +28,8 @@
* \date 22/05/2003
*/
+#include "BLI_utildefines.h"
+
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
#endif
@@ -95,6 +97,7 @@ public:
inline BBox<Point>& operator=(const BBox<Point>& b)
{
+ BLI_assert(!b.empty());
_min = b.getMin();
_max = b.getMax();
_empty = false;
@@ -103,6 +106,7 @@ public:
inline BBox<Point>& operator+=(const BBox<Point>& b)
{
+ BLI_assert(!b.empty());
if (_empty) {
_min = b.getMin();
_max = b.getMax();