[Libreoffice-commits] core.git: 3 commits - dbaccess/source framework/source include/com xmloff/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 25 09:33:46 UTC 2019


 dbaccess/source/core/dataaccess/definitioncontainer.cxx   |    1 +
 framework/source/uielement/genericstatusbarcontroller.cxx |    1 +
 include/com/sun/star/uno/Sequence.hxx                     |   10 ++++++++++
 xmloff/source/draw/ximplink.cxx                           |    1 +
 4 files changed, 13 insertions(+)

New commits:
commit 3975c4e85ff34e48d953b110f947c1768b59e750
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Aug 24 21:31:41 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 25 11:32:38 2019 +0200

    cid#1448241 silence Explicit null deferenced false positive
    
    Change-Id: Iaf20e2c7c6f8502d902b41f2c109589aaa490a10
    Reviewed-on: https://gerrit.libreoffice.org/78075
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/framework/source/uielement/genericstatusbarcontroller.cxx b/framework/source/uielement/genericstatusbarcontroller.cxx
index 431069c9d2b8..ee3b28d4af75 100644
--- a/framework/source/uielement/genericstatusbarcontroller.cxx
+++ b/framework/source/uielement/genericstatusbarcontroller.cxx
@@ -55,6 +55,7 @@ GenericStatusbarController::GenericStatusbarController(
     m_xStatusbarItem = rxItem;
     if ( m_xStatusbarItem.is() )
     {
+        assert(m_aCommandURL.pData);
         m_aCommandURL = m_xStatusbarItem->getCommand();
         m_nID = m_xStatusbarItem->getItemId();
         m_bOwnerDraw = ( m_xStatusbarItem->getStyle() & ui::ItemStyle::OWNER_DRAW ) == ui::ItemStyle::OWNER_DRAW;
diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx
index ec43cf9d38a0..1e891ff1f167 100644
--- a/xmloff/source/draw/ximplink.cxx
+++ b/xmloff/source/draw/ximplink.cxx
@@ -38,6 +38,7 @@ SdXMLShapeLinkContext::SdXMLShapeLinkContext( SvXMLImport& rImport, sal_uInt16 n
         sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
         if( (nPrefix == XML_NAMESPACE_XLINK) && IsXMLToken( aLocalName, XML_HREF ) )
         {
+            assert(msHyperlink.pData);
             msHyperlink = xAttrList->getValueByIndex( i );
             break;
         }
commit be9c16ea495d0e4e5b8d90e64bb481087a7c6b13
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Aug 24 21:10:27 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 25 11:32:18 2019 +0200

    cid#1448427 silence bogus Explicit null dereferenced
    
    Change-Id: I053fac8eb693ec6ed499eff33bbb77d00d05279b
    Reviewed-on: https://gerrit.libreoffice.org/78073
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 738aba7b86f7..c64b17581dc9 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -94,6 +94,7 @@ ODefinitionContainer::ODefinitionContainer(   const Reference< XComponentContext
     ,m_bInPropertyChange(false)
     ,m_bCheckSlash(_bCheckSlash)
 {
+    assert(m_pImpl);
     m_pImpl->m_aProps.bIsDocument = false;
     m_pImpl->m_aProps.bIsFolder = true;
 
commit 51d1724c3543381a61e505e671db6a0bb5ec92de
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Aug 24 21:07:36 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 25 11:31:54 2019 +0200

    cid#1448292 coverity has difficulty with css::uno::Sequence
    
    Change-Id: I227a88c566f981ace5e45d0e217a50abbc7f3023
    Reviewed-on: https://gerrit.libreoffice.org/78072
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx
index 83ddfb9d8101..c31e43141ca3 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -73,10 +73,20 @@ inline Sequence< E >::Sequence(
 {
 }
 
+#if defined(__COVERITY__)
+extern "C" void __coverity_tainted_data_sanitize__(void *);
+#endif
+
 template< class E >
 inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len )
 {
     const Type & rType = ::cppu::getTypeFavourUnsigned( this );
+
+#if defined(__COVERITY__)
+    // cid#1448292 coverity has difficulty with css::uno::Sequence
+    __coverity_tainted_data_sanitize__(pElements);
+#endif
+
     bool success =
     ::uno_type_sequence_construct(
         &_pSequence, rType.getTypeLibType(),


More information about the Libreoffice-commits mailing list