sw/source/core/docnode/ndtbl1.cxx | 2 ++ sw/source/core/layout/pagechg.cxx | 13 ++++++++----- sw/source/core/layout/sectfrm.cxx | 3 ++- sw/source/core/uibase/utlui/glbltree.cxx | 6 ++++-- vcl/source/gdi/pngwrite.cxx | 26 +++++++++++++++++++------- vcl/unx/generic/dtrans/bmp.cxx | 22 ++++++++++++++-------- xmloff/source/style/xmlnumfi.cxx | 1 + 7 files changed, 50 insertions(+), 23 deletions(-)
New commits: commit 6907b67d3d3208eb54289db2476132188d86dfec Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:41:38 2014 +0100 coverity#708633 Uninitialized pointer field Change-Id: Ia629e4d41f163be0c6206943b11a4db083d713c5 diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index ff836c5..4b29431 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -95,13 +95,25 @@ private: }; PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) : - mnCompLevel ( PNG_DEF_COMPRESSION ), - mbStatus ( true ), - mpAccess ( NULL ), - mpMaskAccess ( NULL ), - mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ), - mnCRC(0UL) + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) + : mnCompLevel(PNG_DEF_COMPRESSION) + , mnInterlaced(0) + , mnMaxChunkSize(0) + , mbStatus(true) + , mpAccess(NULL) + , mpMaskAccess(NULL) + , mpZCodec(new ZCodec(DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE)) + , mpDeflateInBuf(NULL) + , mpPreviousScan(NULL) + , mpCurrentScan(NULL) + , mnDeflateInSize(0) + , mnWidth(0) + , mnHeight(0) + , mnBitsPerPixel(0) + , mnFilterType(0) + , mnBBP(0) + , mbTrueAlpha(false) + , mnCRC(0UL) { if ( !rBmpEx.IsEmpty() ) { commit 078803a802c86eb772a77074475b5fd3db9b66ce Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:27:25 2014 +0100 coverity#708655 Uninitialized scalar field Change-Id: Icbb7d84f127a374f0199c217de529575263a8a4e diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index 0e8a2e5..0fb3fe6 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -346,11 +346,20 @@ void x11::X11_freeBmp( sal_uInt8* pBmp ) * PixmapHolder */ -PixmapHolder::PixmapHolder( Display* pDisplay ) : - m_pDisplay( pDisplay ), - m_aColormap( None ), - m_aPixmap( None ), - m_aBitmap( None ) +PixmapHolder::PixmapHolder( Display* pDisplay ) + : m_pDisplay(pDisplay) + , m_aColormap(None) + , m_aPixmap(None) + , m_aBitmap(None) + , m_nRedShift(0) + , m_nRedShift2(0) + , m_nGreenShift(0) + , m_nGreenShift2(0) + , m_nBlueShift(0) + , m_nBlueShift2(0) + , m_nBlueShift2Mask(0) + , m_nRedShift2Mask(0) + , m_nGreenShift2Mask(0) { /* try to get a 24 bit true color visual, if that fails, * revert to default visual @@ -384,11 +393,8 @@ PixmapHolder::PixmapHolder( Display* pDisplay ) : if( m_aInfo.c_class == TrueColor ) { int nRedSig, nGreenSig, nBlueSig; - m_nRedShift = m_nRedShift2 = 0; getShift( m_aInfo.red_mask, m_nRedShift, nRedSig, m_nRedShift2 ); - m_nGreenShift = m_nGreenShift2 = 0; getShift( m_aInfo.green_mask, m_nGreenShift, nGreenSig, m_nGreenShift2 ); - m_nBlueShift = m_nBlueShift2 = 0; getShift( m_aInfo.blue_mask, m_nBlueShift, nBlueSig, m_nBlueShift2 ); m_nBlueShift2Mask = m_nBlueShift2 ? ~((unsigned long)((1<<m_nBlueShift2)-1)) : ~0L; commit e8c424c3e3ed2717c75c85b4ba36d77767e668b0 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:23:19 2014 +0100 coverity#738948 Uninitialized scalar field Change-Id: Ieca446ab69b84249059c5ce4ec713832bd0a8134 diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index e34e5ea..676cd822 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -656,6 +656,7 @@ SvXMLNumFmtPropContext::SvXMLNumFmtPropContext( SvXMLImport& rImport, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), rParent( rParentContext ), + m_nColor( 0 ), bColSet( false ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; commit 8721ae4f77587aa14032708638c2b5a63355a2c7 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:14:36 2014 +0100 coverity#705493 Dereference null return value Change-Id: I20133ad19197fdfe40bb449680ac274ca0fa056e diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 4b66fbf..3b714b8 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -725,12 +725,15 @@ SwPageDesc *SwPageFrm::FindPageDesc() if( pSh && pSh->GetViewOptions()->getBrowseMode() ) { SwCntntFrm *pFrm = GetUpper()->ContainsCntnt(); - while ( !pFrm->IsInDocBody() ) + while (pFrm && !pFrm->IsInDocBody()) pFrm = pFrm->GetNextCntntFrm(); - SwFrm *pFlow = pFrm; - if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); - pRet = (SwPageDesc*)pFlow->GetAttrSet()->GetPageDesc().GetPageDesc(); + if (pFrm) + { + SwFrm *pFlow = pFrm; + if ( pFlow->IsInTab() ) + pFlow = pFlow->FindTabFrm(); + pRet = (SwPageDesc*)pFlow->GetAttrSet()->GetPageDesc().GetPageDesc(); + } if ( !pRet ) pRet = &GetFmt()->GetDoc()->GetPageDesc( 0 ); return pRet; commit 6abeecc614f52cf8473d3fdae954eaa7ebf748ad Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:12:04 2014 +0100 coverity#705524 Dereference null return value Change-Id: Ifdb9a6d8b0b182b5214f2497cc57a419d4820e7c diff --git a/sw/source/core/uibase/utlui/glbltree.cxx b/sw/source/core/uibase/utlui/glbltree.cxx index 2e0e50f..636c9f8 100644 --- a/sw/source/core/uibase/utlui/glbltree.cxx +++ b/sw/source/core/uibase/utlui/glbltree.cxx @@ -1207,8 +1207,10 @@ IMPL_LINK_NOARG( SwGlobalTree, DoubleClickHdl) IMPL_STATIC_LINK_NOINSTANCE(SwGlobalTree, ShowFrameHdl, SwGlobalTree*, EMPTYARG) { - if(SwGlobalTree::GetShowShell()) - SfxViewFrame::GetFirst(SwGlobalTree::GetShowShell())->ToTop(); + const SfxObjectShell* pShell = SwGlobalTree::GetShowShell(); + SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : NULL; + if (pFirst) + pFirst->ToTop(); SwGlobalTree::SetShowShell(0); return 0; } commit 0995da6020b006b6c270d538179ec3154f918939 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:08:52 2014 +0100 coverity#736153 Dereference null return value Change-Id: I226626858fa517af589db7288391daa775de38a5 diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 2fa8089..a281330 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -1373,6 +1373,8 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols sal_Bool bRTL = pTab->IsRightToLeft(); const SwLayoutFrm *pCell = pTab->FirstCell(); + if (!pCell) + continue; do { if ( pCell->IsCellFrm() && pCell->FindTabFrm() == pTab && ::IsFrmInTblSel( rUnion, pCell ) ) commit ff5ff77094c97de1d8af88525e8c0633ede4f6e2 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Apr 17 09:07:20 2014 +0100 coverity#736154 Dereference null return value Change-Id: I8881b0bcf7347fba35edcba4ba23b873312139cb diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 6758cd4..361b66b 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -346,7 +346,8 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) while ( pTmp->GetNext() ) pTmp = pTmp->GetNext(); SwFrm* pSave = ::SaveCntnt( pCol ); - ::RestoreCntnt( pSave, pSibling->GetUpper(), pTmp, true ); + if (pSave) + ::RestoreCntnt( pSave, pSibling->GetUpper(), pTmp, true ); } } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits