comphelper/source/misc/mimeconfighelper.cxx  |    4 ++--
 include/comphelper/mimeconfighelper.hxx      |    3 ++-
 sw/source/core/access/AccessibilityCheck.cxx |   10 ++++++----
 3 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit ba712e9a35179c480cdc6f9d600d79040a273d53
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Dec 21 16:47:18 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Dec 21 21:15:03 2023 +0100

    crashreporting: apparent null deref in a11y check
    
    svl/source/items/itemset.cxx:801
    svl/source/items/itemset.cxx:796
    sw/source/core/access/AccessibilityCheck.cxx:1193
    sw/source/core/access/AccessibilityCheck.cxx:1184
    sw/source/core/access/AccessibilityCheck.cxx:1562
    sw/source/core/access/AccessibilityCheck.cxx:1552
    sw/source/core/txtnode/OnlineAccessibilityCheck.cxx:134
    cppu/source/uno/copy.hxx:288
    cppu/source/uno/any.cxx:72
    cppu/source/typelib/typelib.cxx:1328
    cppu/source/typelib/typelib.cxx:2169
    
    Change-Id: I91a83ffb9f1912dd9736e3d6a194f63475f63b99
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161136
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 7e32a11d0483..9ab27ba788fc 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -1029,10 +1029,12 @@ public:
             return;
 
         // Check if it's a real caption
-        const SwNode* aStartFly = pCurrent->FindFlyStartNode();
-        if (aStartFly
-            && aStartFly->GetFlyFormat()->GetAnchor().GetAnchorId() != 
RndStdIds::FLY_AS_CHAR)
-            return;
+        if (const SwNode* pStartFly = pCurrent->FindFlyStartNode())
+        {
+            const SwFrameFormat* pFormat = pStartFly->GetFlyFormat();
+            if (!pFormat || pFormat->GetAnchor().GetAnchorId() != 
RndStdIds::FLY_AS_CHAR)
+                return;
+        }
 
         auto aIter = SwIterator<SwTextFrame, SwTextNode, 
sw::IteratorMode::UnwrapMulti>(*pTextNode);
         auto nCount = 0;
commit 8cd01e5278b2be25a1186139e431591a85a5080f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Dec 21 16:15:49 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Dec 21 21:14:50 2023 +0100

    allow passing if deep detection is wanted
    
    which naturally requires the data to achieve
    
    Change-Id: If23e7dbd009f3d8e60422ec4d485b459d5721c8f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161135
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/comphelper/source/misc/mimeconfighelper.cxx 
b/comphelper/source/misc/mimeconfighelper.cxx
index 7f402b6351ec..317a6092af75 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -561,7 +561,7 @@ OUString 
MimeConfigurationHelper::GetFactoryNameByMediaType( const OUString& aMe
 
 OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName(
                                         uno::Sequence< beans::PropertyValue >& 
aMediaDescr,
-                                        bool bIgnoreType )
+                                        bool bIgnoreType, bool 
bAllowDeepDetection )
 {
     OUString aFilterName;
 
@@ -581,7 +581,7 @@ OUString 
MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName(
         uno::Sequence< beans::PropertyValue > aTempMD( aMediaDescr );
 
         // get TypeName
-        OUString aTypeName = xTypeDetection->queryTypeByDescriptor( aTempMD, 
true );
+        OUString aTypeName = xTypeDetection->queryTypeByDescriptor(aTempMD, 
bAllowDeepDetection);
 
         // get FilterName
         for ( const auto & prop : std::as_const(aTempMD) )
diff --git a/include/comphelper/mimeconfighelper.hxx 
b/include/comphelper/mimeconfighelper.hxx
index 5dd99664a70a..b30bbfa7cb58 100644
--- a/include/comphelper/mimeconfighelper.hxx
+++ b/include/comphelper/mimeconfighelper.hxx
@@ -104,7 +104,8 @@ public:
 
     OUString UpdateMediaDescriptorWithFilterName(
                         css::uno::Sequence< css::beans::PropertyValue >& 
aMediaDescr,
-                        bool bIgnoreType );
+                        bool bIgnoreType,
+                        bool bAllowDeepFilterDetection = true );
     OUString UpdateMediaDescriptorWithFilterName(
                         css::uno::Sequence< css::beans::PropertyValue >& 
aMediaDescr,
                         css::uno::Sequence< css::beans::NamedValue >& aObject 
);

Reply via email to