Kaydet (Commit) 58401e6c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

This presumably always wanted to check for SAL_MAX_UINT16, not USHRT_MAX

The check against USHRT_MAX was introduced together with a following

  nLen2 = static_cast<UINT16>(nLen);

in 73f043c4 "#96155# #i1858# merge branch and
remove warnings" (and that UINT16 meanwhile replaced with sal_uInt16).

Change-Id: I61346e4ffc90a4f8a97c2d3f822d619faa5b0008
Reviewed-on: https://gerrit.libreoffice.org/48441Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst da67b0be
......@@ -4170,8 +4170,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
{
OSL_ENSURE(nLen2 == nLen,
"Fib length and read length are different");
if (nLen > USHRT_MAX)
nLen = USHRT_MAX;
if (nLen > SAL_MAX_UINT16)
nLen = SAL_MAX_UINT16;
else if (nLen < 2 )
nLen = 2;
nLen2 = static_cast<sal_uInt16>(nLen);
......
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