From 2daf897af6b44e5b36619669377147af1e401cdd Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 2 Mar 2011 16:13:48 -0500 Subject: Make sure these values are positive; we use them to resize arrays. This fixes fdo#34350. --- chart2/source/view/axes/TickmarkHelper.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chart2') diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx index 0749c5b9c413..7ad0bcbf0cde 100644 --- a/chart2/source/view/axes/TickmarkHelper.cxx +++ b/chart2/source/view/axes/TickmarkHelper.cxx @@ -596,6 +596,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); -- cgit