summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 03696fb5208f..faa04a594f1a 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2305,8 +2305,9 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
if (!failure)
{
+ // Check arguments to ShortToSVBT16 in loop below will all be valid:
sal_Int32 nResult;
- failure = o3tl::checked_add(nPN, ncpN, nResult) || nResult > USHRT_MAX;
+ failure = o3tl::checked_add(nPN, ncpN, nResult) || nResult > SAL_MAX_UINT16;
}
if (!failure)