lotuswordpro/source/filter/lwpdrawobj.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b3288c52844bec9e33a7ae725332f95c84384ac7
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jan 17 10:48:12 2022 +0000
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 3 16:39:38 2022 +0100

    ofz: Use-of-uninitialized-value
    
    Change-Id: Ic5f41e4f1f6b20a8cd8887807296f33adb48b728
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128439
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit bb03203848ef1c30786ad084440b5d317a466127)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129415
    Tested-by: Thorsten Behrens <[email protected]>
    Reviewed-by: Thorsten Behrens <[email protected]>

diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx 
b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 8baed94f135a..f3798a8560ea 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1487,7 +1487,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()

Reply via email to