diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-02 09:42:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-02 18:07:01 +0100 |
commit | f3ae7fc962915d6d7b6a4ab16120dd844f9c92a4 (patch) | |
tree | ac272d2e71a9b556fef8e7cb626155d522b8ba47 /filter | |
parent | 782f34ae2f214674fc871ece348ba5dd11c4a8d6 (diff) |
Integer-overflow
Change-Id: Ic99219ff65cea0f316831696231ed6ba8dd10b60
Reviewed-on: https://gerrit.libreoffice.org/44199
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index be64a2faa2d3..2311539f7ae9 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -833,8 +833,13 @@ Point OS2METReader::ReadPoint( const bool bAdjustBoundRect ) x=x-aBoundingRect.Left(); y=aBoundingRect.Bottom()-y; - if ( bAdjustBoundRect ) - aCalcBndRect.Union(tools::Rectangle(x,y,x+1,y+1)); + if (bAdjustBoundRect) + { + if (x == SAL_MAX_INT32 || y == SAL_MAX_INT32) + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + else + aCalcBndRect.Union(tools::Rectangle(x, y, x + 1, y + 1)); + } return Point(x,y); } |