summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins/sunmajor
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-12 18:41:16 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-12 21:00:09 +0200
commitc79a48a75f7f44b5a042109251e185fc4695cde6 (patch)
treee808c12097ab2eae77452f3672bbd74d98793c98 /jvmfwk/plugins/sunmajor
parent24b178cfb6b35789e69d80857e73e911abe338a3 (diff)
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ica8b3c8c5476f2f0f3bebf0cfcd80b08090c6119 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167556 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'jvmfwk/plugins/sunmajor')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx1
1 files changed, 1 insertions, 0 deletions
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)