[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Sun Jan 7 20:28:35 UTC 2018
filter/source/graphicfilter/ios2met/ios2met.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 0a3380ae54e9c33aa4773c6d9878b99b9636dabf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 7 20:27:27 2018 +0000
ofz: fail early
Change-Id: I86790efea5ad4a12578477301959704fb09d67b6
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index b737ac664d14..faf82a7569ed 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -887,6 +887,8 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
if (bCoord32) nOrderLen-=8; else nOrderLen-=4;
}
else aP0=aAttr.aCurPos;
+ if (nOrderLen > pOS2MET->remainingSize())
+ throw css::uno::Exception("attempt to read past end of input", nullptr);
nPolySize=nOrderLen/2;
if (nPolySize==0) return;
tools::Polygon aPolygon(nPolySize);
More information about the Libreoffice-commits
mailing list