diff options
-rw-r--r-- | lotuswordpro/source/filter/lwpobjstrm.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx index 8a28c9fd214a..c9350d8705db 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"); // read object data from stream if(m_nBufSize == 0) { |