From 5dcd4d06483f6a545f2c42d0719775de7ee33f35 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 17 Jan 2022 10:48:12 +0000 Subject: ofz: Use-of-uninitialized-value Change-Id: Ic5f41e4f1f6b20a8cd8887807296f33adb48b728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128439 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit bb03203848ef1c30786ad084440b5d317a466127) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129415 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens (cherry picked from commit b3288c52844bec9e33a7ae725332f95c84384ac7) --- 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 45637de0c32c..7240a57d13b9 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1457,7 +1457,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() -- cgit