[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Mon Aug 17 00:49:27 PDT 2015


 sw/qa/core/data/ww8/pass/crash-2.doc |binary
 sw/source/filter/ww8/WW8Sttbf.cxx    |    2 ++
 2 files changed, 2 insertions(+)

New commits:
commit 93add6c0cfa3c88b957c86ce52f8f95cdef945c3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 16 14:20:54 2015 +0100

    clip Sttbf to available data
    
    Change-Id: Iaa6a8a8505a28cf3c24a48f832bfc618b39c3f32
    (cherry picked from commit 12143f8f84b07057d67d5cd6cc9ff6063dfa41f8)
    Reviewed-on: https://gerrit.libreoffice.org/17784
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/core/data/ww8/pass/crash-2.doc b/sw/qa/core/data/ww8/pass/crash-2.doc
new file mode 100644
index 0000000..452e21e
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/crash-2.doc differ
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index be6de9b..abb57bb 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -32,6 +32,8 @@ namespace ww8
     {
         if (checkSeek(rSt, nPos))
         {
+            sal_Size nRemainingSize = rSt.remainingSize();
+            nSize = std::min<sal_uInt32>(nRemainingSize, nSize);
             mp_data.reset(new sal_uInt8[nSize]);
             mn_size = rSt.Read(mp_data.get(), nSize);
         }


More information about the Libreoffice-commits mailing list