From 18b9aa7280ccb0633c222178582d5ff4234e6140 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 15 May 2013 15:03:27 +0200 Subject: Fix length check - it would be out of bounds. Change-Id: I5430fed06ea1a81a68ddfaafa595d7d5b0167f3b --- oox/source/drawingml/customshapegeometry.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index ffa0e6fcf61f..3155b893c198 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -402,7 +402,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu sal_Unicode n = rValue[ 0 ]; if ( ( n == '+' ) || ( n == '-' ) ) { - if ( !rValue.isEmpty() ) + if ( rValue.getLength() > 1 ) n = rValue[ 1 ]; } if ( ( n >= '0' ) && ( n <= '9' ) ) @@ -1063,7 +1063,6 @@ Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int3 break; case A_TOKEN( lnTo ) : { - if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) ) mrSegments.back().Count++; else -- cgit