filter/source/msfilter/svdfppt.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f31978784bd142d4bb4dd50c328f6eb069ae31c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 31 16:49:26 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Sep 1 09:29:09 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I394b84d9d83d09096932c94fb09e6d964a5aecfe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121398
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 15e70779e868..d4bcb344c01f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5268,8 +5268,8 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const 
DffRecordHeader& rTextHe
     else if( aTextHd.nRecType == PPT_PST_TextBytesAtom )
     {
         std::unique_ptr<char[]> pBuf(new char[ nMaxLen + 1 ]);
+        nMaxLen = rIn.ReadBytes(pBuf.get(), nMaxLen);
         pBuf[ nMaxLen ] = 0;
-        rIn.ReadBytes(pBuf.get(), nMaxLen);
         char* pPtr = pBuf.get();
         for (;;)
         {

Reply via email to