Kaydet (Commit) 989f3a03 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz+ubsan: signed integer overflow

Change-Id: Ie75f4ff4c0efe1a1fb67b8d2edf86af9a962110f
Reviewed-on: https://gerrit.libreoffice.org/43543Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7bc2f1bd
...@@ -2062,9 +2062,13 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const ...@@ -2062,9 +2062,13 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct, WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos) : pPLCF_PosArray(nullptr), nIdx(0), nStru(nStruct) WW8_CP nStartPos) : pPLCF_PosArray(nullptr), nIdx(0), nStru(nStruct)
{ {
OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF is zero!" ); if (nPLCF < 0)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct ); SAL_WARN("sw.ww8", "broken WW8PLCF, ignoring");
nPLCF = 0;
}
else
nIMax = (nPLCF - 4) / (4 + nStruct);
ReadPLCF(rSt, nFilePos, nPLCF); ReadPLCF(rSt, nFilePos, nPLCF);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment