include/tools/UnixWrappers.h |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 75c1687210bbdfd3077758d0bc3ad98d6a2f42dc
Author:     Mike Kaganski <[email protected]>
AuthorDate: Fri Dec 12 09:03:43 2025 +0100
Commit:     Tor Lillqvist <[email protected]>
CommitDate: Sun Dec 14 22:08:16 2025 +0100

    enable-msvc-analyze: C6011: Dereferencing NULL pointer
    
    C:\lo    Dereferencing NULL pointer 'result'. .: Lines: 77, 78, 83, 84, 89, 
90, 91
    
    Change-Id: Ie9f938f7eb5c80a7c5ebb413249de51c29b41f33
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195520
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195603
    Tested-by: Tor Lillqvist <[email protected]>
    Reviewed-by: Tor Lillqvist <[email protected]>

diff --git a/include/tools/UnixWrappers.h b/include/tools/UnixWrappers.h
index 70d560ff0907..377188e367a0 100644
--- a/include/tools/UnixWrappers.h
+++ b/include/tools/UnixWrappers.h
@@ -44,6 +44,7 @@ extern "C" {
 #ifdef _WIN32
 #include <io.h>
 #include <string.h>
+#include <cassert>
 #define WIN32_LEAN_AND_MEAN
 #include <Windows.h>
 /* Undo the mapping in <Windows.h> of CreateFont => CreateFontW etc, as vcl 
also uses these
@@ -87,6 +88,7 @@ extern "C" {
     }
 
     wchar_t* result = (wchar_t*)malloc(wlen * 2 + 2);
+    assert(result);
     MultiByteToWideChar(CP_UTF8, 0, string, len, result, wlen);
     result[wlen] = L'
 

Reply via email to