ofz#43458 avoid OOM
Change-Id: Id0e1e985c446c147a219ba2f5157a41deae656a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128193 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user