ofz#3868 Integer-overflow
Change-Id: Id5de484e365567487cdeaf73f9fa88ef5a735e3e Reviewed-on: https://gerrit.libreoffice.org/44011 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -1921,9 +1921,9 @@ namespace emfio
|
|||||||
|
|
||||||
tools::Rectangle EmfReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
|
tools::Rectangle EmfReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
|
||||||
{
|
{
|
||||||
Point aTL ( Point( x1, y1 ) );
|
Point aTL(x1, y1);
|
||||||
Point aBR( Point( --x2, --y2 ) );
|
Point aBR(o3tl::saturating_add<sal_Int32>(x2, -1), o3tl::saturating_add<sal_Int32>(y2, -1));
|
||||||
return tools::Rectangle( aTL, aBR );
|
return tools::Rectangle(aTL, aBR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user