vcl/source/gdi/svmconverter.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit b36c2961b279c8e8b96b1c6d9682e59eeac3854a Author: Caolán McNamara <caol...@redhat.com> Date: Tue Mar 14 10:26:35 2017 +0000 ofz: reject invalid mapmodes early Change-Id: I7fae0eb980b6dc655254da8b401fc1e71a4e65cf diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 2cadb22..1b2a8a8 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -165,6 +165,12 @@ bool ImplReadMapMode(SvStream& rIStm, MapMode& rMapMode) return false; } + if (nUnit < sal_Int16(MapUnit::Map100thMM) || nUnit > sal_Int16(MapUnit::LAST)) + { + SAL_WARN("vcl.gdi", "Parsing error: invalid mapmode"); + return false; + } + rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) ); return true;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits