From bd8e2365937f0dc58563a3a09c15078b94cd4f5c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 2 Sep 2021 08:49:56 +0100 Subject: do the same check on the same code pattern as was done earlier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in this same function Change-Id: I03a112e3e57549ec776e99a460544b575476528d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121496 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- filter/source/msfilter/svdfppt.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'filter') diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 61e020a2987e..a2ce30270283 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4051,6 +4051,8 @@ void PPTParaSheet::Read( SdrPowerPointImport const & sal_uInt32 nVal32; // number of tabulators rIn.ReadUInt16( nVal16 ); + if (!rIn.good() || rIn.remainingSize() / sizeof(nVal32) < nVal16) + return; for (sal_uInt16 i = 0; i < nVal16; ++i) rIn.ReadUInt32( nVal32 ); // reading the tabulators } -- cgit