[Libreoffice-commits] core.git: sal/osl

Mike Kaganski mike.kaganski at collabora.com
Wed Dec 6 20:45:23 UTC 2017


 sal/osl/w32/security.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5bb95b3d1aef2223fe8c608bf462f22fb7196c6c
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Wed Dec 6 15:36:19 2017 +0200

    Function LookupAccountSidW takes number of characters, not bytes
    
    Change-Id: Ie01feea2c5025f64a7888b85cb5de0c8f6c6f5c2
    Reviewed-on: https://gerrit.libreoffice.org/45955
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx
index 120b5c98258d..77bce5d9bbbc 100644
--- a/sal/osl/w32/security.cxx
+++ b/sal/osl/w32/security.cxx
@@ -786,8 +786,8 @@ static bool SAL_CALL getUserNameImpl(oslSecurity Security, rtl_uString **strName
                 sal_Unicode  UserName[128];
                 sal_Unicode  DomainName[128];
                 sal_Unicode  Name[257];
-                DWORD nUserName   = sizeof(UserName);
-                DWORD nDomainName = sizeof(DomainName);
+                DWORD nUserName   = SAL_N_ELEMENTS(UserName);
+                DWORD nDomainName = SAL_N_ELEMENTS(DomainName);
                 SID_NAME_USE sUse;
 
                 if (LookupAccountSidW(nullptr, reinterpret_cast<PTOKEN_USER>(pInfoBuffer)->User.Sid,


More information about the Libreoffice-commits mailing list