From 1e8d00719c851d69d36cd66eb115c517c1696b64 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 11 Mar 2017 20:20:02 +0000 Subject: ofz: turn assert into throw cause size arg is controllable by the file data Change-Id: Ia92b56c04271557afbec1ab47620bcb34f1c0e8a --- lotuswordpro/source/filter/lwpobjstrm.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx index 072edf700dd2..bc968a550f43 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) + throw std::range_error("bad Object size"); // read object data from stream if(m_nBufSize == 0) { -- cgit