diff options
Diffstat (limited to 'sal/osl/w32/security.cxx')
-rw-r--r-- | sal/osl/w32/security.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx index aeecf1b8ca63..f7e14e7e32ae 100644 --- a/sal/osl/w32/security.cxx +++ b/sal/osl/w32/security.cxx @@ -19,6 +19,7 @@ #include "system.h" +#include <cassert> #include <osl/security.h> #include <osl/diagnose.h> #include <osl/thread.h> @@ -782,6 +783,7 @@ static bool getUserNameImpl(oslSecurity Security, rtl_uString **strName, bool b WNetGetUserW(nullptr, nullptr, &needed); pNameW = static_cast<sal_Unicode *>(malloc (needed*sizeof(sal_Unicode))); + assert(pNameW); // Don't handle OOM conditions if (WNetGetUserW(nullptr, o3tl::toW(pNameW), &needed) == NO_ERROR) { |