vcl/source/gdi/gdimtf.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit fe407fa6ff9cb7597f06e891ea3f136cd9521ef1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Mar 16 16:46:10 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Mar 16 20:20:27 2022 +0100 ofz#45583 Integer-overflow if we currently ignore 0 width/height here presumably we could also safely ignore negative width/height cases Change-Id: I3c061cdeebb1a6c684920977ee67e3ce156fda95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131668 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 5aba0452296e..a747e55f5685 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -459,7 +459,7 @@ void GDIMetaFile::Play(OutputDevice& rOut, const Point& rPos, MapMode aDrawMap( GetPrefMapMode() ); Size aDestSize(rOut.LogicToPixel(rSize)); - if( !aDestSize.Width() || !aDestSize.Height() ) + if (aDestSize.Width() <= 0 || aDestSize.Height() <= 0) return; GDIMetaFile* pMtf = rOut.GetConnectMetaFile();