diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-09 11:30:00 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-01-09 18:28:34 +0000 |
commit | 95b0f165e30a7dc99a76925c613a51992c85ec54 (patch) | |
tree | 1394b3b81fbd63bc6dcb3b250a9274766ee1833d /sw | |
parent | c74bbf75700d3a801f75c25b5e9baaaac851ef2d (diff) |
asan: global-buffer-overflow on ooo12093-1.doc
Change-Id: I5e29626fe2803d2751bdec9c6919662ea37cf64c
Reviewed-on: https://gerrit.libreoffice.org/13819
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index af76674cc0c7..9a6131cce5c2 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5024,7 +5024,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) aInfo.ePos = FTNPOS_PAGE; aInfo.eNum = eNumA[pWDop->rncFtn]; - aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[pWDop->nfcFtnRef]) ); + sal_uInt16 nfcFtnRef = pWDop->nfcFtnRef & 0xF; + aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcFtnRef]) ); if( pWDop->nFtn ) aInfo.nFtnOffset = pWDop->nFtn - 1; rDoc.SetFtnInfo( aInfo ); @@ -5033,8 +5034,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) { SwEndNoteInfo aInfo; aInfo = rDoc.GetEndNoteInfo(); // Same as for Ftn - - aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[pWDop->nfcEdnRef]) ); + sal_uInt16 nfcEdnRef = pWDop->nfcEdnRef & 0xF; + aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcEdnRef]) ); if( pWDop->nEdn ) aInfo.nFtnOffset = pWDop->nEdn - 1; rDoc.SetEndNoteInfo( aInfo ); |