summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-20 16:21:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-20 16:21:40 +0000
commit075889bf851b4e7d742f0f31005ac7c0d8ea81d7 (patch)
tree972654497009f81d825014c6f8995005a34a4da7 /vcl/source/gdi
parent2ee7ad015147de33c172677b70a120f45f2e794f (diff)
reject more invalid mapmodes
Change-Id: I068968028b3ed27dc6220bfd335e322ede74454d
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/svmconverter.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index fb88d4d4494b..89e42dd0f94c 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -159,7 +159,7 @@ bool ImplReadMapMode(SvStream& rIStm, MapMode& rMapMode)
sal_Int32 nXNum(0), nXDenom(0), nYNum(0), nYDenom(0);
rIStm.ReadInt32(nXNum).ReadInt32(nXDenom).ReadInt32(nYNum).ReadInt32(nYDenom);
- if (!rIStm.good() || nXDenom < 0 || nYDenom < 0 || nXNum < 0 || nYNum < 0)
+ if (!rIStm.good() || nXDenom <= 0 || nYDenom <= 0 || nXNum <= 0 || nYNum <= 0)
{
SAL_WARN("vcl.gdi", "Parsing error: invalid mapmode fraction");
return false;