From 65d4320110d3f6ab9242389fdc8d392de13cbb74 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 2 Sep 2021 16:51:03 +0100 Subject: ofz: MemorySanitizer: use-of-uninitialized-value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I00531cdb266c4277af742cee6ce5d05f0ea3334e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121523 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- vcl/source/filter/imet/ios2met.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vcl/source/filter/imet/ios2met.cxx b/vcl/source/filter/imet/ios2met.cxx index 0057d3f55808..0888a84c576d 100644 --- a/vcl/source/filter/imet/ios2met.cxx +++ b/vcl/source/filter/imet/ios2met.cxx @@ -936,6 +936,12 @@ void OS2METReader::ReadBox(bool bGivenPos) sal_Int32 nHRound = ReadCoord(bCoord32); sal_Int32 nVRound = ReadCoord(bCoord32); + if (!pOS2MET->good()) + { + SAL_WARN("filter.os2met", "OS2METReader::ReadBox: short read"); + return; + } + tools::Rectangle aBoxRect( P0, aAttr.aCurPos ); if ( pAreaStack ) -- cgit