summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-24 14:15:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-25 09:55:37 +0200
commit5bc60b8d1a6be30308c829ad8f8fb5416fd874db (patch)
treee2f53200a36ebfb37085f4efd15f3dbe36add324
parent56616073d2044520cd4eb21e9e4a6bc363d03ee0 (diff)
ofz#3758 Integer-overflow
Change-Id: If0dc095025d59186b1bc49b93acf7747b7a65f20 Reviewed-on: https://gerrit.libreoffice.org/43775 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/ww8scan.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 970290527f2f..7e67fb9f5c1a 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1830,7 +1830,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rF.nLen = rF.nId = rF.nOpt = 0;
rF.bCodeNest = rF.bResNest = false;
- if( !rPLCF.Get( rF.nSCode, pData ) ) // end of PLCFspecial?
+ if (!rPLCF.Get(rF.nSCode, pData) || rF.nSCode < 0) // end of PLCFspecial?
goto Err;
rPLCF.advance();