summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-05-15 15:03:27 +0200
committerJan Holesovsky <kendy@suse.cz>2013-05-16 04:57:15 +0200
commit18b9aa7280ccb0633c222178582d5ff4234e6140 (patch)
tree7cfc88ac5a123c866ef0af92a0930874ad6eca33 /oox
parent0a330eb7405f75c82707a73d2c2e404326a48554 (diff)
Fix length check - it would be out of bounds.
Change-Id: I5430fed06ea1a81a68ddfaafa595d7d5b0167f3b
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx3
1 files changed, 1 insertions, 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