tools/source/stream/stream.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 74d20cc4c3346398c17f4f4ece7e462363f71868 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Mar 2 20:39:12 2017 +0000 ReAllocateMemory mustn't delete data it doesn't own Change-Id: I09725cd21973ace1aab22de17bdae2023a739212 Reviewed-on: https://gerrit.libreoffice.org/34831 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 99a4d22..d9e99b4 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1830,6 +1830,9 @@ bool SvMemoryStream::AllocateMemory( std::size_t nNewSize ) // (using Bozo algorithm) bool SvMemoryStream::ReAllocateMemory( long nDiff ) { + if (!bOwnsData) + return false; + bool bRetVal = false; long nTemp = (long)nSize; nTemp += nDiff;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits