[Libreoffice-commits] .: Branch 'libreoffice-3-3' - chart2/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Mar 7 06:17:54 PST 2011
chart2/source/view/axes/TickmarkHelper.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit a200691a5081bb4b1f2008da6e503d73c0c70b85
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Mar 2 16:13:48 2011 -0500
Make sure these values are positive; we use them to resize arrays.
This fixes fdo#34350.
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx
index aa616ca..ddf9888 100644
--- a/chart2/source/view/axes/TickmarkHelper.cxx
+++ b/chart2/source/view/axes/TickmarkHelper.cxx
@@ -597,6 +597,9 @@ void TickmarkHelper::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rA
sal_Int32 nDepthCount = this->getTickDepth();
sal_Int32 nMaxMajorTickCount = this->getMaxTickCount( 0 );
+ if (nDepthCount <= 0 || nMaxMajorTickCount <= 0)
+ return;
+
aAllTicks.realloc(nDepthCount);
aAllTicks[0].realloc(nMaxMajorTickCount);
More information about the Libreoffice-commits
mailing list