diff options
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 2ea201082cce..4811c8b8d9cc 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1047,6 +1047,8 @@ void LwpDrawTextBox::Read() // the 71 is the fixed length before text content in textbox record sal_Int16 TextLength = m_aObjHeader.nRecLen - 71; + if (TextLength < 0) + throw BadRead(); m_aTextRec.pTextString = new sal_uInt8 [TextLength]; m_pStream->ReadBytes(m_aTextRec.pTextString, TextLength); |