include/LibreOfficeKit/LibreOfficeKitInit.h |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit a337a6ed162826f95cf52b88241d45c2b392d751
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Jun 27 19:18:18 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Jun 27 20:44:24 2024 +0200

    warning C6011: Dereferencing NULL pointer 'sNewPath'
    
     C:\louild\instdir\sdk\include\LibreOfficeKit\LibreOfficeKitInit.h(161) : 
warning C6011:
     Dereferencing NULL pointer 'sNewPath'. : Lines: 136, 137, 138, 140, 143, 
144, 157, 159, 160, 161
    
    Change-Id: I0fba0db79b4a36f293e867da262a970eb152e3d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169651
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index 10085d3c1c35..eafee08083a4 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -158,6 +158,7 @@ extern "C"
             size_sEnvPath = strlen(sEnvPath);
         buffer_size = size_sEnvPath + 2*strlen(pPath) + strlen(UNOPATH) + 4;
         sNewPath = (char *) malloc(buffer_size);
+        assert(sNewPath);
         sNewPath[0] = L'
         strcat_s(sNewPath, buffer_size, pPath);     // program to PATH
         strcat_s(sNewPath, buffer_size, ";");

Reply via email to