summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-18 12:51:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-18 14:54:39 +0100
commit6c77d646dfd1ed057f6c81831764c1f85e857c5e (patch)
treeddfab1ebbae6c0b3857ceec410612e37b2ec1490
parent43b7b2bb72890601129983f5102d15347ef03ef6 (diff)
ofz#6999 check available data len
Change-Id: I89a7913d35706ee5797beee654ef99be088431b8 Reviewed-on: https://gerrit.libreoffice.org/51497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 06993b1eaa8e..69c8458ec16e 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -477,8 +477,8 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
const sal_uInt8* pSprmCDttmRMark;
if( nsRedlineType_t::REDLINE_FORMAT == eType )
{
- pSprmCIbstRMark = pData+1;
- pSprmCDttmRMark = pData+3;
+ pSprmCIbstRMark = nLen >= 2 ? pData+1 : nullptr;
+ pSprmCDttmRMark = nLen >= 5 ? pData+3 : nullptr;
}
else
{