Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index



Hi,

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

31 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 31 defect(s)


** CID 1325077:  Uninitialized members  (UNINIT_CTOR)
/editeng/source/outliner/overflowingtxt.cxx: 149 in NonOverflowingText::NonOverflowingText(const 
ESelection &, bool)()


________________________________________________________________________________________________________
*** CID 1325077:  Uninitialized members  (UNINIT_CTOR)
/editeng/source/outliner/overflowingtxt.cxx: 149 in NonOverflowingText::NonOverflowingText(const 
ESelection &, bool)()
143     }
144     
145     NonOverflowingText::NonOverflowingText(const ESelection &aSel, bool bLastParaInterrupted)
146         : maContentSel(aSel),
147           mbLastParaInterrupted(bLastParaInterrupted)
148     {
    CID 1325077:  Uninitialized members  (UNINIT_CTOR)
    Non-static class member "mpContentTextObj" is not initialized in this constructor nor in 
any functions that it calls.
149     }
150     
151     bool NonOverflowingText::IsLastParaInterrupted() const
152     {
153         return mbLastParaInterrupted;
154     }

** CID 1325076:    (UNINIT)
/vcl/source/gdi/salmisc.cxx: 388 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
/vcl/source/gdi/salmisc.cxx: 388 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()


________________________________________________________________________________________________________
*** CID 1325076:    (UNINIT)
/vcl/source/gdi/salmisc.cxx: 388 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
382     
383         try
384         {
385             pSrcScan = new Scanline[ rSrcBuffer.mnHeight ];
386             pDstScan = new Scanline[ nDstDY ];
387             pMapX = new long[ nDstDX ];
    CID 1325076:    (UNINIT)
    Assigning: "pMapY" = "new long[nDstDY]", which is allocated but not initialized.
388             pMapY = new long[ nDstDY ];
389         }
390         catch( const std::bad_alloc& )
391         {
392             // memory exception, clean up
393             // remark: the buffer ptr causing the exception
/vcl/source/gdi/salmisc.cxx: 388 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
382     
383         try
384         {
385             pSrcScan = new Scanline[ rSrcBuffer.mnHeight ];
386             pDstScan = new Scanline[ nDstDY ];
387             pMapX = new long[ nDstDX ];
    CID 1325076:    (UNINIT)
    Assigning: "pMapY" = "new long[nDstDY]", which is allocated but not initialized.
388             pMapY = new long[ nDstDY ];
389         }
390         catch( const std::bad_alloc& )
391         {
392             // memory exception, clean up
393             // remark: the buffer ptr causing the exception

** CID 1325075:    (UNINIT)
/vcl/source/gdi/salmisc.cxx: 387 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
/vcl/source/gdi/salmisc.cxx: 387 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()


________________________________________________________________________________________________________
*** CID 1325075:    (UNINIT)
/vcl/source/gdi/salmisc.cxx: 387 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
381         long            nTmp, nOffset;
382     
383         try
384         {
385             pSrcScan = new Scanline[ rSrcBuffer.mnHeight ];
386             pDstScan = new Scanline[ nDstDY ];
    CID 1325075:    (UNINIT)
    Assigning: "pMapX" = "new long[nDstDX]", which is allocated but not initialized.
387             pMapX = new long[ nDstDX ];
388             pMapY = new long[ nDstDY ];
389         }
390         catch( const std::bad_alloc& )
391         {
392             // memory exception, clean up
/vcl/source/gdi/salmisc.cxx: 387 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
381         long            nTmp, nOffset;
382     
383         try
384         {
385             pSrcScan = new Scanline[ rSrcBuffer.mnHeight ];
386             pDstScan = new Scanline[ nDstDY ];
    CID 1325075:    (UNINIT)
    Assigning: "pMapX" = "new long[nDstDX]", which is allocated but not initialized.
387             pMapX = new long[ nDstDX ];
388             pMapY = new long[ nDstDY ];
389         }
390         catch( const std::bad_alloc& )
391         {
392             // memory exception, clean up

** CID 1325074:    (UNINIT)
/vcl/source/gdi/salmisc.cxx: 386 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
/vcl/source/gdi/salmisc.cxx: 386 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()


________________________________________________________________________________________________________
*** CID 1325074:    (UNINIT)
/vcl/source/gdi/salmisc.cxx: 386 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
380         long*           pMapY = NULL;
381         long            nTmp, nOffset;
382     
383         try
384         {
385             pSrcScan = new Scanline[ rSrcBuffer.mnHeight ];
    CID 1325074:    (UNINIT)
    Assigning: "pDstScan" = "new Scanline[nDstDY]", which is allocated but not initialized.
386             pDstScan = new Scanline[ nDstDY ];
387             pMapX = new long[ nDstDX ];
388             pMapY = new long[ nDstDY ];
389         }
390         catch( const std::bad_alloc& )
391         {
/vcl/source/gdi/salmisc.cxx: 386 in StretchAndConvert(const BitmapBuffer &, const SalTwoRect &, 
unsigned long, const BitmapPalette *, const ColorMask *)()
380         long*           pMapY = NULL;
381         long            nTmp, nOffset;
382     
383         try
384         {
385             pSrcScan = new Scanline[ rSrcBuffer.mnHeight ];
    CID 1325074:    (UNINIT)
    Assigning: "pDstScan" = "new Scanline[nDstDY]", which is allocated but not initialized.
386             pDstScan = new Scanline[ nDstDY ];
387             pMapX = new long[ nDstDX ];
388             pMapY = new long[ nDstDY ];
389         }
390         catch( const std::bad_alloc& )
391         {

** CID 1325073:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/ui/view/editsh.cxx: 337 in ScEditShell::Execute(SfxRequest &)()


________________________________________________________________________________________________________
*** CID 1325073:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/ui/view/editsh.cxx: 337 in ScEditShell::Execute(SfxRequest &)()
331                     }
332                     bSetModified = false;
333                 }
334                 return;
335             case SID_UNICODE_NOTATION_TOGGLE:
336                 {
    CID 1325073:  Null pointer dereferences  (REVERSE_INULL)
    Null-checking "pHdl" suggests that it may be null, but it has already been dereferenced on 
all paths leading to the check.
337                     EditView* pActiveView = pHdl ? pHdl->GetActiveView() : pEditView;
338                     if( pActiveView )
339                     {
340                         OUString sInput = pEngine->GetText();
341                         ESelection aSel( pActiveView->GetSelection() );
342                         if( aSel.HasRange() )

** CID 1325072:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/textchainflow.cxx: 300 in 
EditingTextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *)()


________________________________________________________________________________________________________
*** CID 1325072:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/textchainflow.cxx: 300 in 
EditingTextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *)()
294         impBroadcastCursorInfo();
295     }
296     
297     void EditingTextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *pNonOverflOutl)
298     {
299         //OutlinerParaObject *pNewText =
    CID 1325072:  Resource leaks  (RESOURCE_LEAK)
    Ignoring storage allocated by "this->mpOverflChText->RemoveOverflowingText(pNonOverflOutl)" 
leaks it.
300         mpOverflChText->RemoveOverflowingText(pNonOverflOutl);
301         //impSetTextForEditingOutliner(pNewText); //XXX: Don't call it since we do everything 
with NonOverflowingText::ToParaObject // XXX: You may need this for Underflow
302     
303         // XXX: I'm not sure whether we need this (after all operations such as Paste don't 
change this - as far as I understand)
304         //GetLinkTarget()->NbcSetOutlinerParaObject(pNewText);
305     }

** CID 1325071:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/svdotxed.cxx: 337 in SdrTextObj::EndTextEdit(SdrOutliner &)()


________________________________________________________________________________________________________
*** CID 1325071:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/svdotxed.cxx: 337 in SdrTextObj::EndTextEdit(SdrOutliner &)()
331         rOutl.Clear();
332         EEControlBits nStat = rOutl.GetControlWord();
333         nStat &= ~EEControlBits::AUTOPAGESIZE;
334         rOutl.SetControlWord(nStat);
335     
336         mbInEditMode = false;
    CID 1325071:  Resource leaks  (RESOURCE_LEAK)
    Variable "pNewText" going out of scope leaks the storage it points to.
337     }
338     
339     sal_uInt16 SdrTextObj::GetOutlinerViewAnchorMode() const
340     {
341         SdrTextHorzAdjust eH=GetTextHorizontalAdjust();
342         SdrTextVertAdjust eV=GetTextVerticalAdjust();

** CID 1325070:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/gdi/dibtools.cxx: 1552 in ImplWriteDIB(const Bitmap &, const Bitmap *, SvStream &, 
bool, bool)()


________________________________________________________________________________________________________
*** CID 1325070:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/gdi/dibtools.cxx: 1552 in ImplWriteDIB(const Bitmap &, const Bitmap *, SvStream &, 
bool, bool)()
1546             {
1547                 rOStm.SetError(SVSTREAM_GENERALERROR);
1548                 rOStm.Seek(nOldPos);
1549             }
1550     
1551             rOStm.SetEndian(nOldFormat);
    CID 1325070:  Resource leaks  (RESOURCE_LEAK)
    Variable "pAccAlpha" going out of scope leaks the storage it points to.
1552         }
1553     
1554         return bRet;
1555     }
1556     
1557     bool ReadDIB(

** CID 1325069:  Resource leaks  (RESOURCE_LEAK)
/chart2/source/view/main/3DChartObjects.cxx: 110 in chart::opengl3D::TextCache::getText(const 
rtl::OUString &, bool)()


________________________________________________________________________________________________________
*** CID 1325069:  Resource leaks  (RESOURCE_LEAK)
/chart2/source/view/main/3DChartObjects.cxx: 110 in chart::opengl3D::TextCache::getText(const 
rtl::OUString &, bool)()
104         long nBmpHeight = aText.GetSizePixel().Height();
105         sal_uInt8* pBitmapBuf(new sal_uInt8[3* nBmpWidth * nBmpHeight]);
106         memcpy(pBitmapBuf, buf, 3* nBmpWidth * nBmpHeight);
107         TextCacheItem *pItem = new TextCacheItem(pBitmapBuf, aText.GetSizePixel());
108         maTextCache.insert(rText, pItem);
109     
    CID 1325069:  Resource leaks  (RESOURCE_LEAK)
    Variable "pAcc" going out of scope leaks the storage it points to.
110         return *maTextCache.find(rText)->second;
111     }
112     
113     Text::Text(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& rStr, 
sal_uInt32 nId):
114         Renderable3DObject(pRenderer, nId),
115         maText(rTextCache.getText(rStr))

** CID 1325068:  Resource leaks  (RESOURCE_LEAK)
/editeng/source/outliner/outliner.cxx: 421 in Outliner::SetToEmptyText()()


________________________________________________________________________________________________________
*** CID 1325068:  Resource leaks  (RESOURCE_LEAK)
/editeng/source/outliner/outliner.cxx: 421 in Outliner::SetToEmptyText()()
415     }
416     
417     void Outliner::SetToEmptyText()
418     {
419         OutlinerParaObject *pEmptyTxt =  GetEmptyParaObject();
420         SetText(*pEmptyTxt);
    CID 1325068:  Resource leaks  (RESOURCE_LEAK)
    Variable "pEmptyTxt" going out of scope leaks the storage it points to.
421     }
422     
423     void Outliner::SetText( const OUString& rText, Paragraph* pPara )
424     {
425         DBG_ASSERT(pPara,"SetText:No Para");
426     

** CID 1325067:    (RESOURCE_LEAK)
/vcl/source/gdi/dibtools.cxx: 740 in ImplReadDIBBody(SvStream &, Bitmap &, Bitmap *, unsigned long, 
bool)()
/vcl/source/gdi/dibtools.cxx: 740 in ImplReadDIBBody(SvStream &, Bitmap &, Bitmap *, unsigned long, 
bool)()


________________________________________________________________________________________________________
*** CID 1325067:    (RESOURCE_LEAK)
/vcl/source/gdi/dibtools.cxx: 740 in ImplReadDIBBody(SvStream &, Bitmap &, Bitmap *, unsigned long, 
bool)()
734             const sal_uInt16 nBitCount(discretizeBitcount(aHeader.nBitCount));
735             const Size aSizePixel(aHeader.nWidth, aHeader.nHeight);
736             BitmapPalette aDummyPal;
737             Bitmap aNewBmp(aSizePixel, nBitCount, &aDummyPal);
738             BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
739             if (!pAcc || pAcc->Width() != aHeader.nWidth || pAcc->Height() != aHeader.nHeight)
    CID 1325067:    (RESOURCE_LEAK)
    Variable "pAcc" going out of scope leaks the storage it points to.
740                 return false;
741             Bitmap aNewBmpAlpha;
742             BitmapWriteAccess* pAccAlpha = 0;
743             bool bAlphaPossible(pBmpAlpha && aHeader.nBitCount == 32);
744     
745             if (bAlphaPossible)
/vcl/source/gdi/dibtools.cxx: 740 in ImplReadDIBBody(SvStream &, Bitmap &, Bitmap *, unsigned long, 
bool)()
734             const sal_uInt16 nBitCount(discretizeBitcount(aHeader.nBitCount));
735             const Size aSizePixel(aHeader.nWidth, aHeader.nHeight);
736             BitmapPalette aDummyPal;
737             Bitmap aNewBmp(aSizePixel, nBitCount, &aDummyPal);
738             BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
739             if (!pAcc || pAcc->Width() != aHeader.nWidth || pAcc->Height() != aHeader.nHeight)
    CID 1325067:    (RESOURCE_LEAK)
    Variable "pAcc" going out of scope leaks the storage it points to.
740                 return false;
741             Bitmap aNewBmpAlpha;
742             BitmapWriteAccess* pAccAlpha = 0;
743             bool bAlphaPossible(pBmpAlpha && aHeader.nBitCount == 32);
744     
745             if (bAlphaPossible)

** CID 1325066:    (RESOURCE_LEAK)
/svx/source/svdraw/svdedxv.cxx: 1339 in SdrObjEditView::KeyInput(const KeyEvent &, vcl::Window *)()
/svx/source/svdraw/svdedxv.cxx: 1318 in SdrObjEditView::KeyInput(const KeyEvent &, vcl::Window *)()
/svx/source/svdraw/svdedxv.cxx: 1341 in SdrObjEditView::KeyInput(const KeyEvent &, vcl::Window *)()


________________________________________________________________________________________________________
*** CID 1325066:    (RESOURCE_LEAK)
/svx/source/svdraw/svdedxv.cxx: 1339 in SdrObjEditView::KeyInput(const KeyEvent &, vcl::Window *)()
1333     
1334                 if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
1335     #ifdef DBG_UTIL
1336                 if (mpItemBrowser!=nullptr) mpItemBrowser->SetDirty();
1337     #endif
1338                 ImpMakeTextCursorAreaVisible();
    CID 1325066:    (RESOURCE_LEAK)
    Variable "pCursorManager" going out of scope leaks the storage it points to.
1339                 return true;
1340             }
1341         }
1342         return SdrGlueEditView::KeyInput(rKEvt,pWin);
1343     }
1344     
/svx/source/svdraw/svdedxv.cxx: 1318 in SdrObjEditView::KeyInput(const KeyEvent &, vcl::Window *)()
1312             /* Start special handling of keys within a chain */
1313             // We possibly move to another box before any handling
1314             bool bHandled = false;
1315             TextChainCursorManager *pCursorManager =
1316                 ImpHandleMotionThroughBoxesKeyInput(rKEvt, pWin, &bHandled);
1317             if (bHandled)
    CID 1325066:    (RESOURCE_LEAK)
    Variable "pCursorManager" going out of scope leaks the storage it points to.
1318                 return true;
1319             /* End special handling of keys within a chain */
1320     
1321             if (pTextEditOutlinerView->PostKeyEvent(rKEvt, pWin))
1322             {
1323                 if( mpModel )
/svx/source/svdraw/svdedxv.cxx: 1341 in SdrObjEditView::KeyInput(const KeyEvent &, vcl::Window *)()
1335     #ifdef DBG_UTIL
1336                 if (mpItemBrowser!=nullptr) mpItemBrowser->SetDirty();
1337     #endif
1338                 ImpMakeTextCursorAreaVisible();
1339                 return true;
1340             }
    CID 1325066:    (RESOURCE_LEAK)
    Variable "pCursorManager" going out of scope leaks the storage it points to.
1341         }
1342         return SdrGlueEditView::KeyInput(rKEvt,pWin);
1343     }
1344     
1345     bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
1346     {

** CID 1325065:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/svdedxv.cxx: 560 in 
SdrObjEditView::ImpAfterCutOrPasteChainingEventHdl(LinkParamNone *)()


________________________________________________________________________________________________________
*** CID 1325065:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/svdedxv.cxx: 560 in 
SdrObjEditView::ImpAfterCutOrPasteChainingEventHdl(LinkParamNone *)()
554         SdrTextObj* pTextObj = dynamic_cast< SdrTextObj * >( GetTextEditObject());
555         if (!pTextObj)
556             return;
557         ImpChainingEventHdl();
558         TextChainCursorManager *pCursorManager = new TextChainCursorManager(this, pTextObj);
559         ImpMoveCursorAfterChainingEvent(pCursorManager);
    CID 1325065:  Resource leaks  (RESOURCE_LEAK)
    Variable "pCursorManager" going out of scope leaks the storage it points to.
560     }
561     
562     void SdrObjEditView::ImpMoveCursorAfterChainingEvent(TextChainCursorManager *pCursorManager)
563     {
564         if (!mxTextEditObj.is() || !pCursorManager)
565             return;

** CID 1325064:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/textchainflow.cxx: 187 in TextChainFlow::ExecuteUnderflow(SdrOutliner *)()


________________________________________________________________________________________________________
*** CID 1325064:  Resource leaks  (RESOURCE_LEAK)
/svx/source/svdraw/textchainflow.cxx: 187 in TextChainFlow::ExecuteUnderflow(SdrOutliner *)()
181         pOutl->SetText(*pNewText);
182     
183         //GetTextChain()->SetNilChainingEvent(mpTargetLink, false);
184     
185         // Check for new overflow
186         CheckForFlowEvents(pOutl);
    CID 1325064:  Resource leaks  (RESOURCE_LEAK)
    Variable "pNewText" going out of scope leaks the storage it points to.
187     }
188     
189     void TextChainFlow::ExecuteOverflow(SdrOutliner *pNonOverflOutl, SdrOutliner *pOverflOutl)
190     {
191         //GetTextChain()->SetNilChainingEvent(mpTargetLink, true);
192         // Leave only non overflowing text

** CID 1325063:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/gdi/bitmap3.cxx: 1131 in Bitmap::ImplScaleFast(const double &, const double &)()


________________________________________________________________________________________________________
*** CID 1325063:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/gdi/bitmap3.cxx: 1131 in Bitmap::ImplScaleFast(const double &, const double &)()
1125                     }
1126                 }
1127                 ReleaseAccess( pReadAcc );
1128     
1129                 if( bRet )
1130                     ImplAssignWithSize( aNewBmp );
    CID 1325063:  Resource leaks  (RESOURCE_LEAK)
    Variable "pWriteAcc" going out of scope leaks the storage it points to.
1131             }
1132         }
1133     
1134         return bRet;
1135     }
1136     

** CID 1325062:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/gdi/bitmap3.cxx: 2616 in Bitmap::ImplConvolutionPass(Bitmap&, BitmapReadAccess *, int, 
double *, int *, int *)()


________________________________________________________________________________________________________
*** CID 1325062:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/gdi/bitmap3.cxx: 2616 in Bitmap::ImplConvolutionPass(Bitmap&, BitmapReadAccess *, int, 
double *, int *, int *)()
2610     
2611     bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess* pReadAcc, int 
aNumberOfContributions, double* pWeights, int* pPixels, int* pCount)
2612     {
2613         BitmapWriteAccess* pWriteAcc = aNewBitmap.AcquireWriteAccess();
2614     
2615         if (!pReadAcc || !pWriteAcc)
    CID 1325062:  Resource leaks  (RESOURCE_LEAK)
    Variable "pWriteAcc" going out of scope leaks the storage it points to.
2616             return false;
2617     
2618         const int nHeight = GetSizePixel().Height();
2619         assert(GetSizePixel().Height() == aNewBitmap.GetSizePixel().Width());
2620         const int nWidth = GetSizePixel().Width();
2621         assert(GetSizePixel().Width() == aNewBitmap.GetSizePixel().Height());

** CID 1325061:  Resource leaks  (RESOURCE_LEAK)
/vcl/unx/generic/gdi/salbmp.cxx: 565 in X11SalBitmap::ImplCreateXImage(SalDisplay *, SalX11Screen, 
long, const SalTwoRect &) const()


________________________________________________________________________________________________________
*** CID 1325061:  Resource leaks  (RESOURCE_LEAK)
/vcl/unx/generic/gdi/salbmp.cxx: 565 in X11SalBitmap::ImplCreateXImage(SalDisplay *, SalX11Screen, 
long, const SalTwoRect &) const()
559                 }
560                 else
561                 {
562                     XDestroyImage( pImage );
563                     pImage = NULL;
564                 }
    CID 1325061:  Resource leaks  (RESOURCE_LEAK)
    Variable "pDstBuf" going out of scope leaks the storage it points to.
565             }
566         }
567     
568         return pImage;
569     }
570     

** CID 1325060:  Error handling issues  (NEGATIVE_RETURNS)
/vcl/source/glyphs/graphite_layout.cxx: 742 in GraphiteLayout::ApplyDXArray(ImplLayoutArgs &, 
std::vector<int, std::allocator<int>> &)()


________________________________________________________________________________________________________
*** CID 1325060:  Error handling issues  (NEGATIVE_RETURNS)
/vcl/source/glyphs/graphite_layout.cxx: 742 in GraphiteLayout::ApplyDXArray(ImplLayoutArgs &, 
std::vector<int, std::allocator<int>> &)()
736                 for (int n = firstChar; n <= lastChar; ++n)
737                     if (mvCharDxs[n - mnMinCharPos] != -1)
738                         mvCharDxs[n - mnMinCharPos] += nDWidth + nDGlyphOrigin;
739             for (int n = i; n < nLastGlyph; n++)
740                 mvGlyphs[n].maLinearPos.X() += (nDGlyphOrigin + nDWidth) * (bRtl ? -1 : 1);
741     
    CID 1325060:  Error handling issues  (NEGATIVE_RETURNS)
    "nBaseGlyph" is passed to a parameter that cannot be negative. [Note: The source code 
implementation of the function has been overridden by a builtin model.]
742             rDeltaWidth[nBaseGlyph] = nDWidth;
743     #ifdef GRLAYOUT_DEBUG
744             fprintf(grLog(),"c%d=%d g%d-%d dW%ld-%ld=%ld dX%ld x%ld @%d=%d\n", firstChar, 
lastChar, i, nLastGlyph, nNewClusterWidth, nOrigClusterWidth, nDWidth, nDGlyphOrigin, 
mvGlyphs[i].maLinearPos.X(), mvCharDxs[lastChar - mnMinCharPos], args.mpDXArray[lastChar - 
args.mnMinCharPos]);
745     #endif
746             i = nLastGlyph - 1;
747             if (i >= endGi - 1)

** CID 1325059:    (NEGATIVE_RETURNS)
/vcl/source/glyphs/graphite_layout.cxx: 693 in GraphiteLayout::ApplyDXArray(ImplLayoutArgs &, 
std::vector<int, std::allocator<int>> &)()
/vcl/source/glyphs/graphite_layout.cxx: 693 in GraphiteLayout::ApplyDXArray(ImplLayoutArgs &, 
std::vector<int, std::allocator<int>> &)()


________________________________________________________________________________________________________
*** CID 1325059:    (NEGATIVE_RETURNS)
/vcl/source/glyphs/graphite_layout.cxx: 693 in GraphiteLayout::ApplyDXArray(ImplLayoutArgs &, 
std::vector<int, std::allocator<int>> &)()
687         fprintf(grLog(),"ApplyDx %d-%d=%d-%d\n", startChar, endChar, startGi, endGi);
688     #endif
689     
690         for (int i = startGi; i < endGi; ++i)
691         {
692             // calculate visual cluster bounds
    CID 1325059:    (NEGATIVE_RETURNS)
    "i" is passed to a parameter that cannot be negative. [Note: The source code implementation 
of the function has been overridden by a builtin model.]
693             int firstChar = mvGlyph2Char[i];
694             int nBaseGlyph = mvChar2BaseGlyph[firstChar - mnMinCharPos];
695             while (nBaseGlyph == -1 && i < endGi)
696             {
697                 ++i;
698                 firstChar = mvGlyph2Char[i];
/vcl/source/glyphs/graphite_layout.cxx: 693 in GraphiteLayout::ApplyDXArray(ImplLayoutArgs &, 
std::vector<int, std::allocator<int>> &)()
687         fprintf(grLog(),"ApplyDx %d-%d=%d-%d\n", startChar, endChar, startGi, endGi);
688     #endif
689     
690         for (int i = startGi; i < endGi; ++i)
691         {
692             // calculate visual cluster bounds
    CID 1325059:    (NEGATIVE_RETURNS)
    "i" is passed to a parameter that cannot be negative. [Note: The source code implementation 
of the function has been overridden by a builtin model.]
693             int firstChar = mvGlyph2Char[i];
694             int nBaseGlyph = mvChar2BaseGlyph[firstChar - mnMinCharPos];
695             while (nBaseGlyph == -1 && i < endGi)
696             {
697                 ++i;
698                 firstChar = mvGlyph2Char[i];

** CID 1325058:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/editsh.cxx: 337 in ScEditShell::Execute(SfxRequest &)()


________________________________________________________________________________________________________
*** CID 1325058:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/editsh.cxx: 337 in ScEditShell::Execute(SfxRequest &)()
331                     }
332                     bSetModified = false;
333                 }
334                 return;
335             case SID_UNICODE_NOTATION_TOGGLE:
336                 {
    CID 1325058:  Null pointer dereferences  (FORWARD_NULL)
    Comparing "pHdl" to null implies that "pHdl" might be null.
337                     EditView* pActiveView = pHdl ? pHdl->GetActiveView() : pEditView;
338                     if( pActiveView )
339                     {
340                         OUString sInput = pEngine->GetText();
341                         ESelection aSel( pActiveView->GetSelection() );
342                         if( aSel.HasRange() )


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?tab=overview

To manage Coverity Scan email notifications for "libreoffice@lists.freedesktop.org", click 
https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.