[Libreoffice-commits] libcdr.git: src/lib
David Tardon
dtardon at redhat.com
Wed Apr 12 12:37:56 UTC 2017
src/lib/CDRStylesCollector.cpp | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit d3115eaf664eb01d03af1fe65c0c2680960b6ab7
Author: David Tardon <dtardon at redhat.com>
Date: Wed Apr 12 14:37:11 2017 +0200
ofz#998 fix division by 0
Change-Id: I85c2888adf6289d6cfd23728d36e130a15f54368
diff --git a/src/lib/CDRStylesCollector.cpp b/src/lib/CDRStylesCollector.cpp
index 093dad8..99f6caf 100644
--- a/src/lib/CDRStylesCollector.cpp
+++ b/src/lib/CDRStylesCollector.cpp
@@ -36,6 +36,9 @@ void libcdr::CDRStylesCollector::collectBmp(unsigned imageId, unsigned colorMode
libcdr::CDRInternalStream stream(bitmap);
librevenge::RVNGBinaryData image;
+ if (height == 0)
+ height = 1;
+
unsigned tmpPixelSize = (unsigned)(height * width);
if (tmpPixelSize < (unsigned)height) // overflow
return;
More information about the Libreoffice-commits
mailing list