diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-13 10:48:47 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-03-14 12:28:24 +0100 |
commit | 806b124218bbd4f5296b35959795599e21aa017c (patch) | |
tree | 355303e5253be8deb49eb763d8bcc2b1fb7e217b /lotuswordpro | |
parent | bcd3275a8c2088308970e012cf39c4753f5e582a (diff) |
ofz#45524 string is presumed to be at least length 1
Change-Id: If8a86e399109b414cf53f6e2bffdd3c7c6faa490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131467
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 404bc6aa1b5d..429a818e1af9 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1250,7 +1250,11 @@ void LwpDrawTextArt::Read() - (m_aTextArtRec.aPath[1].n*3 + 1)*4; - if (!m_pStream->good() || m_aTextArtRec.nTextLen > m_pStream->remainingSize()) + if (!m_pStream->good()) + throw BadRead(); + if (m_aTextArtRec.nTextLen > m_pStream->remainingSize()) + throw BadRead(); + if (m_aTextArtRec.nTextLen < 1) throw BadRead(); m_aTextArtRec.pTextString = new sal_uInt8 [m_aTextArtRec.nTextLen]; |