New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Thu Apr 5 05:28:37 UTC 2018


Hi,

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

20 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

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


** CID 1433797:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 727 in SmRootNode::Arrange(OutputDevice &, const SmFormat &)()


________________________________________________________________________________________________________
*** CID 1433797:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 727 in SmRootNode::Arrange(OutputDevice &, const SmFormat &)()
721     
722         pBody->Arrange(rDev, rFormat);
723     
724         long  nHeight,
725               nVerOffset;
726         lcl_GetHeightVerOffset(*pBody, nHeight, nVerOffset);
>>>     CID 1433797:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "rFormat->GetDistance(2)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "rFormat->GetDistance(2) * this->GetFont()->GetFontSize()->Height()" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "rFormat->GetDistance(2) * this->GetFont()->GetFontSize()->Height()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
727         nHeight += rFormat.GetDistance(DIS_ROOT)
728                    * GetFont().GetFontSize().Height() / 100L;
729     
730         // font specialist advised to change the width first
731         pRootSym->AdaptToY(rDev, nHeight);
732         pRootSym->AdaptToX(rDev, pBody->GetItalicWidth());

** CID 1433796:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/filter/jpeg/JpegReader.cxx: 196 in JPEGReader::CreateBitmap(const JPEGCreateBitmapParam &)()


________________________________________________________________________________________________________
*** CID 1433796:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/filter/jpeg/JpegReader.cxx: 196 in JPEGReader::CreateBitmap(const JPEGCreateBitmapParam &)()
190     
191         Size aSize(rParam.nWidth, rParam.nHeight);
192         bool bGray = rParam.bGray;
193     
194         mpBitmap.reset(new Bitmap());
195     
>>>     CID 1433796:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "aSize.Width() * aSize.Height()" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "sal_uInt64" (64 bits, unsigned).
196         sal_uInt64 nSize = aSize.Width() * aSize.Height();
197     
198         if (nSize > SAL_MAX_INT32 / (bGray?1:3))
199             return false;
200     
201         if( bGray )

** CID 1433795:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/toolkit/source/awt/animatedimagespeer.cxx: 233 in toolkit::<unnamed>::lcl_updateImageList_nothrow(toolkit::AnimatedImagesPeer_Data &)()


________________________________________________________________________________________________________
*** CID 1433795:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/toolkit/source/awt/animatedimagespeer.cxx: 233 in toolkit::<unnamed>::lcl_updateImageList_nothrow(toolkit::AnimatedImagesPeer_Data &)()
227                                 )
228                                 // do not use an image set which doesn't fit into the window
229                                 continue;
230     
231                             const sal_Int64 distance =
232                                     ( aWindowSizePixel.Width() - check->Width ) * ( aWindowSizePixel.Width() - check->Width )
>>>     CID 1433795:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "(aWindowSizePixel.Height() - check->Height) * (aWindowSizePixel.Height() - check->Height)" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "sal_Int64 const" (64 bits, signed).
233                                 +   ( aWindowSizePixel.Height() - check->Height ) * ( aWindowSizePixel.Height() - check->Height );
234                             if ( distance < nMinimalDistance )
235                             {
236                                 nMinimalDistance = distance;
237                                 nPreferredSet = check - aImageSizes.begin();
238                             }

** CID 1433794:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/txtnode/fntcache.cxx: 155 in SwFntObj::CreatePrtFont(const OutputDevice &)()


________________________________________________________________________________________________________
*** CID 1433794:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/txtnode/fntcache.cxx: 155 in SwFntObj::CreatePrtFont(const OutputDevice &)()
149             delete m_pPrtFont;
150     
151         const vcl::Font aOldFnt( rPrt.GetFont() );
152         const_cast<OutputDevice&>(rPrt).SetFont( m_aFont );
153         const FontMetric aWinMet( rPrt.GetFontMetric() );
154         const_cast<OutputDevice&>(rPrt).SetFont( aOldFnt );
>>>     CID 1433794:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "this->m_nPropWidth" with type "sal_uInt16" (16 bits, unsigned) is promoted in "aWinMet.GetFontSize()->Width() * this->m_nPropWidth / 100" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "aWinMet.GetFontSize()->Width() * this->m_nPropWidth / 100" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
155         long nWidth = ( aWinMet.GetFontSize().Width() * m_nPropWidth ) / 100;
156     
157         if( !nWidth )
158             ++nWidth;
159         m_pPrtFont = new vcl::Font( m_aFont );
160         m_pPrtFont->SetFontSize( Size( nWidth, m_aFont.GetFontSize().Height() ) );

** CID 1433793:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1433793:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/filter/ww8/ww8atr.cxx: 5057 in ParaTabStopDelAdd(WW8Export &, const SvxTabStopItem &, long, const SvxTabStopItem &, long)()
5051     
5052             if( nOP == SAL_MAX_INT32 && nNP == SAL_MAX_INT32 )
5053                 break;                                  // everything done
5054     
5055             if( nOP < nNP )                             // next tab is old
5056             {
>>>     CID 1433793:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pTO" to "Del", which dereferences it.
5057                 aTab.Del(*pTO, nLStypeMgn);             // must be deleted
5058                 nO++;
5059             }
5060             else if( nNP < nOP )                        // next tab is new
5061             {
5062                 aTab.Add(*pTN, nLParaMgn);              // must be inserted

** CID 1433792:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 1701 in SmAttributNode::Arrange(OutputDevice &, const SmFormat &)()


________________________________________________________________________________________________________
*** CID 1433792:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 1701 in SmAttributNode::Arrange(OutputDevice &, const SmFormat &)()
1695             case TOVERSTRIKE :
1696                 eVerAlign = RectVerAlign::AttributeMid;
1697                 break;
1698             default :
1699                 eVerAlign = RectVerAlign::AttributeHi;
1700                 if (pBody->GetType() == SmNodeType::Attribut)
>>>     CID 1433792:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "rFormat->GetDistance(16)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "this->GetFont()->GetFontSize()->Height() * rFormat->GetDistance(16)" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "this->GetFont()->GetFontSize()->Height() * rFormat->GetDistance(16)" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
1701                     nDist = GetFont().GetFontSize().Height()
1702                             * rFormat.GetDistance(DIS_ORNAMENTSPACE) / 100L;
1703         }
1704         Point  aPos = pAttr->AlignTo(*pBody, RectPos::Attribute, RectHorAlign::Center, eVerAlign);
1705         aPos.AdjustY( -nDist );
1706         pAttr->MoveTo(aPos);

** CID 1433791:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 1972 in SmPolyLineNode::Arrange(OutputDevice &, const SmFormat &)()


________________________________________________________________________________________________________
*** CID 1433791:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 1972 in SmPolyLineNode::Arrange(OutputDevice &, const SmFormat &)()
1966             aPointB.setX( maToSize.Width() - nBorderwidth );
1967             aPointB.setY( maToSize.Height() - nBorderwidth );
1968         }
1969         maPoly.SetPoint(aPointA, 0);
1970         maPoly.SetPoint(aPointB, 1);
1971     
>>>     CID 1433791:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "rFormat->GetDistance(8)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "this->GetFont()->GetFontSize()->Height() * rFormat->GetDistance(8)" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "this->GetFont()->GetFontSize()->Height() * rFormat->GetDistance(8)" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
1972         long  nThick       = GetFont().GetFontSize().Height()
1973                                 * rFormat.GetDistance(DIS_STROKEWIDTH) / 100L;
1974         mnWidth = nThick + 2 * nBorderwidth;
1975     
1976         SmRect::operator = (SmRect(maToSize.Width(), maToSize.Height()));
1977     }

** CID 1433790:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 601 in SmLineNode::Arrange(OutputDevice &, const SmFormat &)()


________________________________________________________________________________________________________
*** CID 1433790:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 601 in SmLineNode::Arrange(OutputDevice &, const SmFormat &)()
595             SetWidth(1);
596             SetItalicSpaces(0, 0);
597             return;
598         }
599     
600         // make distance depend on font size
>>>     CID 1433790:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "rFormat->GetDistance(0)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "rFormat->GetDistance(0) * this->GetFont()->GetFontSize()->Height()" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "rFormat->GetDistance(0) * this->GetFont()->GetFontSize()->Height()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
601         long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetFontSize().Height()) / 100L;
602         if (!IsUseExtraSpaces())
603             nDist = 0;
604     
605         Point   aPos;
606         // copy the first node into LineNode and extend by the others

** CID 1433789:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/uibase/shells/tabsh.cxx: 231 in lcl_TableParamToItemSet(SfxItemSet &, SwWrtShell &)()


________________________________________________________________________________________________________
*** CID 1433789:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/uibase/shells/tabsh.cxx: 231 in lcl_TableParamToItemSet(SfxItemSet &, SwWrtShell &)()
225         pRep->SetSpace(aCols.GetRightMax());
226     
227         sal_uInt16 nPercent = 0;
228         long nWidth = ::GetTableWidth(pFormat, aCols, &nPercent, &rSh );
229         // The table width is wrong for relative values.
230         if(nPercent)
>>>     CID 1433789:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "nPercent" with type "sal_uInt16" (16 bits, unsigned) is promoted in "pRep->GetSpace() * nPercent / 100" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "pRep->GetSpace() * nPercent / 100" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
231             nWidth = pRep->GetSpace() * nPercent / 100;
232         const sal_uInt16 nAlign = pFormat->GetHoriOrient().GetHoriOrient();
233         pRep->SetAlign(nAlign);
234         SvxLRSpaceItem aLRSpace( pFormat->GetLRSpace() );
235         SwTwips nLeft = aLRSpace.GetLeft();
236         SwTwips nRight = aLRSpace.GetRight();

** CID 1433788:  Integer handling issues  (SIGN_EXTENSION)
/svx/source/dialog/paraprev.cxx: 203 in SvxParaPrevWindow::DrawParagraph(OutputDevice &)()


________________________________________________________________________________________________________
*** CID 1433788:  Integer handling issues  (SIGN_EXTENSION)
/svx/source/dialog/paraprev.cxx: 203 in SvxParaPrevWindow::DrawParagraph(OutputDevice &)()
197     
198             rRenderContext.DrawRect( aRect );
199             Lines[i] = aRect;
200     
201             if (5 == i)
202             {
>>>     CID 1433788:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "this->nLower" with type "sal_uInt16" (16 bits, unsigned) is promoted in "this->nLower * aLineSiz.Height() / this->aSize.Height()" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "this->nLower * aLineSiz.Height() / this->aSize.Height()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
203                 long nBottom = nLower * aLineSiz.Height() / aSize.Height();
204                 aPnt.AdjustY(nBottom * 2 );
205             }
206     
207             aPnt.AdjustY(nH );
208             // Reset, recalculate for each line

** CID 1433787:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 1477 in SmBracebodyNode::Arrange(OutputDevice &, const SmFormat &)()


________________________________________________________________________________________________________
*** CID 1433787:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 1477 in SmBracebodyNode::Arrange(OutputDevice &, const SmFormat &)()
1471             SmNode *pNode = GetSubNode(i);
1472             pNode->AdaptToY(rDev, nHeight);
1473             pNode->Arrange(rDev, rFormat);
1474         }
1475     
1476         // horizontal distance between argument and brackets or separators
>>>     CID 1433787:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "rFormat->GetDistance(12)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "this->GetFont()->GetFontSize()->Height() * rFormat->GetDistance(12)" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "this->GetFont()->GetFontSize()->Height() * rFormat->GetDistance(12)" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
1477         long  nDist = GetFont().GetFontSize().Height()
1478                       * rFormat.GetDistance(DIS_BRACKETSPACE) / 100L;
1479     
1480         SmNode *pLeft = GetSubNode(0);
1481         SmRect::operator = (*pLeft);
1482         for (size_t i = 1; i < nNumSubNodes; ++i)

** CID 1433786:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 490 in SmTableNode::Arrange(OutputDevice &, const SmFormat &)()


________________________________________________________________________________________________________
*** CID 1433786:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/node.cxx: 490 in SmTableNode::Arrange(OutputDevice &, const SmFormat &)()
484         // arranges all subnodes in one column
485     {
486         SmNode *pNode;
487         size_t nSize = GetNumSubNodes();
488     
489         // make distance depend on font size
>>>     CID 1433786:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "rFormat->GetDistance(1)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "+(rFormat->GetDistance(1) * this->GetFont()->GetFontSize()->Height())" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "+(rFormat->GetDistance(1) * this->GetFont()->GetFontSize()->Height())" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
490         long  nDist = +(rFormat.GetDistance(DIS_VERTICAL)
491                         * GetFont().GetFontSize().Height()) / 100L;
492     
493         if (nSize < 1)
494             return;
495     

** CID 1433785:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1433785:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/filter/ww8/ww8atr.cxx: 5062 in ParaTabStopDelAdd(WW8Export &, const SvxTabStopItem &, long, const SvxTabStopItem &, long)()
5056             {
5057                 aTab.Del(*pTO, nLStypeMgn);             // must be deleted
5058                 nO++;
5059             }
5060             else if( nNP < nOP )                        // next tab is new
5061             {
>>>     CID 1433785:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pTN" to "Add", which dereferences it.
5062                 aTab.Add(*pTN, nLParaMgn);              // must be inserted
5063                 nN++;
5064             }
5065             else if (lcl_IsEqual(nOP, *pTO, nNP, *pTN)) // tabs are equal
5066             {
5067                 nO++;                                   // nothing to do

** CID 1433784:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/rect.cxx: 236 in SmRect::SmRect(const OutputDevice &, const SmFormat *, const rtl::OUString &, unsigned short)()


________________________________________________________________________________________________________
*** CID 1433784:  Integer handling issues  (SIGN_EXTENSION)
/starmath/source/rect.cxx: 236 in SmRect::SmRect(const OutputDevice &, const SmFormat *, const rtl::OUString &, unsigned short)()
230             nItalicLeftSpace  = 0;
231         if (nItalicRightSpace < 0  &&  !bAllowSmaller)
232             nItalicRightSpace = 0;
233     
234         long  nDist = 0;
235         if (pFormat)
>>>     CID 1433784:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "pFormat->GetDistance(15)" with type "sal_uInt16" (16 bits, unsigned) is promoted in "rDev->GetFont()->GetFontSize()->Height() * pFormat->GetDistance(15) / 100" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "rDev->GetFont()->GetFontSize()->Height() * pFormat->GetDistance(15) / 100" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
236             nDist = (rDev.GetFont().GetFontSize().Height()
237                     * pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100;
238     
239         nHiAttrFence = aGlyphRect.TopLeft().Y() - 1 - nBorderWidth - nDist;
240         nLoAttrFence = SmFromTo(GetAlignB(), GetBottom(), 0.0);
241     

** CID 1433783:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/control/throbber.cxx: 136 in Throbber::initImages()()


________________________________________________________________________________________________________
*** CID 1433783:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/control/throbber.cxx: 136 in Throbber::initImages()()
130                         ||  ( aImageSize.Height() > aWindowSizePixel.Height() )
131                         )
132                         // do not use an image set which doesn't fit into the window
133                         continue;
134     
135                     const sal_Int64 distance =
>>>     CID 1433783:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "(aWindowSizePixel.Width() - aImageSize.Width()) * (aWindowSizePixel.Width() - aImageSize.Width())" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "sal_Int64 const" (64 bits, signed).
136                             ( aWindowSizePixel.Width() - aImageSize.Width() ) * ( aWindowSizePixel.Width() - aImageSize.Width() )
137                         +   ( aWindowSizePixel.Height() - aImageSize.Height() ) * ( aWindowSizePixel.Height() - aImageSize.Height() );
138                     if ( distance < nMinimalDistance )
139                     {
140                         nMinimalDistance = distance;
141                         nPreferredSet = check - aImageSets.begin();

** CID 1433782:  Integer handling issues  (SIGN_EXTENSION)
/svx/source/dialog/paraprev.cxx: 88 in SvxParaPrevWindow::DrawParagraph(OutputDevice &)()


________________________________________________________________________________________________________
*** CID 1433782:  Integer handling issues  (SIGN_EXTENSION)
/svx/source/dialog/paraprev.cxx: 88 in SvxParaPrevWindow::DrawParagraph(OutputDevice &)()
82     
83         for (sal_uInt16 i = 0; i < 9; ++i)
84         {
85             if (i == 3)
86             {
87                 rRenderContext.SetFillColor(COL_GRAY);
>>>     CID 1433782:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "this->nUpper" with type "sal_uInt16" (16 bits, unsigned) is promoted in "this->nUpper * aLineSiz.Height() / this->aSize.Height()" to type "int" (32 bits, signed), then sign-extended to type "long" (64 bits, signed).  If "this->nUpper * aLineSiz.Height() / this->aSize.Height()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
88                 long nTop = nUpper * aLineSiz.Height() / aSize.Height();
89                 aPnt.AdjustY(nTop * 2 );
90             }
91     
92             if (i == 6 )
93                 rRenderContext.SetFillColor(aGrayColor);

** CID 1433781:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/control/throbber.cxx: 137 in Throbber::initImages()()


________________________________________________________________________________________________________
*** CID 1433781:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/control/throbber.cxx: 137 in Throbber::initImages()()
131                         )
132                         // do not use an image set which doesn't fit into the window
133                         continue;
134     
135                     const sal_Int64 distance =
136                             ( aWindowSizePixel.Width() - aImageSize.Width() ) * ( aWindowSizePixel.Width() - aImageSize.Width() )
>>>     CID 1433781:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "(aWindowSizePixel.Height() - aImageSize.Height()) * (aWindowSizePixel.Height() - aImageSize.Height())" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "sal_Int64 const" (64 bits, signed).
137                         +   ( aWindowSizePixel.Height() - aImageSize.Height() ) * ( aWindowSizePixel.Height() - aImageSize.Height() );
138                     if ( distance < nMinimalDistance )
139                     {
140                         nMinimalDistance = distance;
141                         nPreferredSet = check - aImageSets.begin();
142                     }

** CID 1433780:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/toolkit/source/awt/animatedimagespeer.cxx: 232 in toolkit::<unnamed>::lcl_updateImageList_nothrow(toolkit::AnimatedImagesPeer_Data &)()


________________________________________________________________________________________________________
*** CID 1433780:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/toolkit/source/awt/animatedimagespeer.cxx: 232 in toolkit::<unnamed>::lcl_updateImageList_nothrow(toolkit::AnimatedImagesPeer_Data &)()
226                                 ||  ( check->Height > aWindowSizePixel.Height() )
227                                 )
228                                 // do not use an image set which doesn't fit into the window
229                                 continue;
230     
231                             const sal_Int64 distance =
>>>     CID 1433780:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "(aWindowSizePixel.Width() - check->Width) * (aWindowSizePixel.Width() - check->Width)" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "sal_Int64 const" (64 bits, signed).
232                                     ( aWindowSizePixel.Width() - check->Width ) * ( aWindowSizePixel.Width() - check->Width )
233                                 +   ( aWindowSizePixel.Height() - check->Height ) * ( aWindowSizePixel.Height() - check->Height );
234                             if ( distance < nMinimalDistance )
235                             {
236                                 nMinimalDistance = distance;
237                                 nPreferredSet = check - aImageSizes.begin();

** CID 1401308:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 371 in std::unique_ptr<SwPauseThreadStarting, std::default_delete<SwPauseThreadStarting>>::reset(SwPauseThreadStarting *)()


________________________________________________________________________________________________________
*** CID 1401308:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 371 in std::unique_ptr<SwPauseThreadStarting, std::default_delete<SwPauseThreadStarting>>::reset(SwPauseThreadStarting *)()
365            *
366            * @param __p  The new pointer to store.
367            *
368            * The deleter will be invoked if a pointer is already owned.
369            */
370           void
>>>     CID 1401308:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     An exception of type "com::sun::star::uno::DeploymentException" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
371           reset(pointer __p = pointer()) noexcept
372           {
373     	using std::swap;
374     	swap(_M_t._M_ptr(), __p);
375     	if (__p != pointer())
376     	  get_deleter()(__p);

** CID 1401307:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 264 in std::unique_ptr<SwPauseThreadStarting, std::default_delete<SwPauseThreadStarting>>::~unique_ptr()()


________________________________________________________________________________________________________
*** CID 1401307:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 264 in std::unique_ptr<SwPauseThreadStarting, std::default_delete<SwPauseThreadStarting>>::~unique_ptr()()
258           template<typename _Up, typename = _Require<
259     	       is_convertible<_Up*, _Tp*>, is_same<_Dp, default_delete<_Tp>>>>
260     	unique_ptr(auto_ptr<_Up>&& __u) noexcept;
261     #endif
262     
263           /// Destructor, invokes the deleter if the stored pointer is not null.
>>>     CID 1401307:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     An exception of type "com::sun::star::uno::DeploymentException" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
264           ~unique_ptr() noexcept
265           {
266     	auto& __ptr = _M_t._M_ptr();
267     	if (__ptr != nullptr)
268     	  get_deleter()(__ptr);
269     	__ptr = pointer();


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyWcBpXPVooCmem-2B7DTFF2l6IJRTRFkBx3CRLxSw7NUeL-2BEf3CuuDNiWTPrZpTXVC0-2BQ4DzkYjXiDlpTTY4-2BTSOu-2B5YeTPidV6DB27qq60cT9PHrgbR74kPCNgnZhDiMvk2t-2Fo86j-2F-2FylYvvDh5FMtG5kGEv4OaIO2AGx8DwS95gc-3D



More information about the LibreOffice mailing list