[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Mon Mar 13 13:45:49 UTC 2017
lotuswordpro/source/filter/lwpobjstrm.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 2dd2ef0a09cc1deb991abc55e3fd87cf9c73002e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Mar 11 20:20:02 2017 +0000
ofz: turn assert into throw
cause size arg is controllable by the file data
(cherry picked from commit 1e8d00719c851d69d36cd66eb115c517c1696b64)
Change-Id: Ia92b56c04271557afbec1ab47620bcb34f1c0e8a
Reviewed-on: https://gerrit.libreoffice.org/35084
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 748b48f..8675516 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -68,7 +68,8 @@ LwpObjectStream::LwpObjectStream(LwpSvStream *pStrm, bool isCompressed, sal_uInt
:m_pContentBuf(nullptr), m_nBufSize(size), m_nReadPos(0),
m_pStrm(pStrm), m_bCompressed(isCompressed)
{
- assert(size<IO_BUFFERSIZE);
+ if (size >= IO_BUFFERSIZE)
+ throw std::range_error("bad Object size");
ReadStream();
}
/**
More information about the Libreoffice-commits
mailing list