jvmfwk/plugins/sunmajor/pluginlib/util.cxx |    1 +
 jvmfwk/source/elements.cxx                 |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c79a48a75f7f44b5a042109251e185fc4695cde6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun May 12 18:41:16 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun May 12 21:00:09 2024 +0200

    WaE: C6011 Dereferencing NULL pointer warnings
    
    Change-Id: Ica8b3c8c5476f2f0f3bebf0cfcd80b08090c6119
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167556
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 1610188f55ac..21258af12944 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -539,6 +539,7 @@ static bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
                 if( RegQueryValueExW(hKey, L"JavaHome", nullptr, &dwType, 
nullptr, &dwTmpPathLen)== ERROR_SUCCESS)
                 {
                     unsigned char* szTmpPath= static_cast<unsigned char 
*>(malloc(dwTmpPathLen+sizeof(sal_Unicode)));
+                    assert(szTmpPath && "Don't handle OOM conditions");
                     // According to https://msdn.microsoft.com/en-us/ms724911, 
the application should ensure
                     // that the string is properly terminated before using it
                     for (DWORD i = 0; i < sizeof(sal_Unicode); ++i)
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index d47af20f2e4b..00ad1d741667 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -683,7 +683,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * 
pJavaInfo)
     OString sExcMsg("[Java framework] Error in function 
NodeJavaInfo::loadFromNode "
                          "(elements.cxx)."_ostr);
 
-    OSL_ASSERT(pJavaInfo && pDoc);
+    assert(pJavaInfo && pDoc);
     if (pJavaInfo->children == nullptr)
         return;
     //Get the xsi:nil attribute;

Reply via email to