Kaydet (Commit) 18b9aa72 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Fix length check - it would be out of bounds.

Change-Id: I5430fed06ea1a81a68ddfaafa595d7d5b0167f3b
üst 0a330eb7
...@@ -402,7 +402,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu ...@@ -402,7 +402,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
sal_Unicode n = rValue[ 0 ]; sal_Unicode n = rValue[ 0 ];
if ( ( n == '+' ) || ( n == '-' ) ) if ( ( n == '+' ) || ( n == '-' ) )
{ {
if ( !rValue.isEmpty() ) if ( rValue.getLength() > 1 )
n = rValue[ 1 ]; n = rValue[ 1 ];
} }
if ( ( n >= '0' ) && ( n <= '9' ) ) if ( ( n >= '0' ) && ( n <= '9' ) )
...@@ -1063,7 +1063,6 @@ Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int3 ...@@ -1063,7 +1063,6 @@ Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int3
break; break;
case A_TOKEN( lnTo ) : case A_TOKEN( lnTo ) :
{ {
if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) ) if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) )
mrSegments.back().Count++; mrSegments.back().Count++;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment