From be28c746d013c16fa6c2e50f5f9debc45d39d81b Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 7 Apr 2015 13:18:31 +0800
Subject: advapi32: Initialize buffer length to zero in LsaLookupSids to
 prevent crash. (try 2)

Superseded 110588-110594

Try 2:
- Use RtlInitUnicodeStringEx to simplify code when possible. Same for
other patches in this series. (Thanks Nikolay)
---
 dlls/advapi32/lsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index 2a8b791..69c29c5 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -502,7 +502,7 @@ NTSTATUS WINAPI LsaLookupSids(
     {
         (*Names)[i].Use = SidTypeUnknown;
         (*Names)[i].DomainIndex = -1;
-        (*Names)[i].Name.Buffer = NULL;
+        RtlInitUnicodeStringEx(&(*Names)[i].Name, NULL);
 
         memset(&(*ReferencedDomains)->Domains[i], 0, sizeof(LSA_TRUST_INFORMATION));
 
-- 
2.3.5

