Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1492337:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/text/itradj.cxx: 521 in 
SwTextAdjuster::CalcKanaAdj(SwLineLayout *)()


________________________________________________________________________________________________________
*** CID 1492337:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/text/itradj.cxx: 521 in 
SwTextAdjuster::CalcKanaAdj(SwLineLayout *)()
515                 // during text formatting
516                 sal_uInt16 nMaxWidthDiff = GetInfo().GetMaxWidthDiff( pPos 
);
517     
518                 // check, if information is stored under other key
519                 if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
520                     nMaxWidthDiff = GetInfo().GetMaxWidthDiff( pCurrent );
>>>     CID 1492337:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "nMaxWidthDiff" with type 
>>> "sal_uInt16" (16 bits, unsigned) is promoted in "nMinWidth + (10000 - 
>>> nCompress) * nMaxWidthDiff / 10000" to type "int" (32 bits, signed), then 
>>> sign-extended to type "long" (64 bits, signed).  If "nMinWidth + (10000 - 
>>> nCompress) * nMaxWidthDiff / 10000" is greater than 0x7FFFFFFF, the upper 
>>> bits of the result will all be 1.
521                 pPos->Width( nMinWidth +
522                            ( ( 10000 - nCompress ) * nMaxWidthDiff ) / 
10000 );
523                 nDecompress += pPos->Width() - nMinWidth;
524             }
525             else if( pPos->InGlueGrp() && pPos->InFixMargGrp() )
526             {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3Djy6E_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiv7uWe2YXPLfUTEQTPWjOUofnlaM2UIGk8VEHF1GIbG9oDSwzcFSqA9GQLcYYZggDVNZAHQ4x61QrHmfX00bEPzJwHb3tpfdUrgrQ8-2FY-2FzjvQvbabBbz2waRzAv9RdSflRH4XwFtrR4zvwLHNQsfceD73BrzAod9LDdWXgUXQTxk-3D

Reply via email to