[Libreoffice-commits] .: chart2/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Mar 2 13:15:02 PST 2011


 chart2/source/view/axes/TickmarkHelper.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1e3b1a7a8c939a0ae08a14d5efdd65b17355dae9
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.

diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx
index 5be4f14..2e1fcde 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);
 


More information about the Libreoffice-commits mailing list