From 84dc0f3dc044ab13e3d8638433d2b5533fc55aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 17 Jan 2022 10:48:12 +0000 Subject: [PATCH] ofz: Use-of-uninitialized-value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic5f41e4f1f6b20a8cd8887807296f33adb48b728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128496 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- lotuswordpro/source/filter/lwpdrawobj.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 808edae43e68..f7bd4f511283 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1481,7 +1481,8 @@ void LwpDrawBitmap::Read() pPicData += 30*sizeof(sal_uInt8); } - m_pStream->ReadBytes(pPicData, nDIBRemaining); + if (nDIBRemaining != m_pStream->ReadBytes(pPicData, nDIBRemaining)) + throw BadRead(); } OUString LwpDrawBitmap::RegisterStyle()