Kaydet (Commit) 1e8d0071 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz: turn assert into throw

cause size arg is controllable by the file data

Change-Id: Ia92b56c04271557afbec1ab47620bcb34f1c0e8a
üst 86408240
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment