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

afl-clang-fast++ seems to miscompile this

doesn't harm to swap the order of comparisons, and include the failing testcase
for reference

Change-Id: I38399cca8f6085704ee714faa04fbbf283138c3d
üst 0030efe0
This diff was suppressed by a .gitattributes entry.
...@@ -1901,12 +1901,12 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr, ...@@ -1901,12 +1901,12 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr,
long nLen = ( (nNextPieceCp < nBehindTextCp) ? nNextPieceCp long nLen = ( (nNextPieceCp < nBehindTextCp) ? nNextPieceCp
: nBehindTextCp ) - nAktStartCp; : nBehindTextCp ) - nAktStartCp;
if( 0 >= nLen )
break;
if( nLen > USHRT_MAX - 1 ) if( nLen > USHRT_MAX - 1 )
nLen = USHRT_MAX - 1; nLen = USHRT_MAX - 1;
if( 0 >= nLen )
break;
rStr += bIsUnicode rStr += bIsUnicode
? read_uInt16s_ToOUString(rStrm, nLen) ? read_uInt16s_ToOUString(rStrm, nLen)
: read_uInt8s_ToOUString(rStrm, nLen, eEnc); : read_uInt8s_ToOUString(rStrm, nLen, eEnc);
......
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