[SAMSRV]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 26 Oct 2013 18:48:53 +0000 (18:48 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 26 Oct 2013 18:48:53 +0000 (18:48 +0000)
- Fix incorrect heap buffer size, CID 716678.

svn path=/trunk/; revision=60754

reactos/dll/win32/samsrv/samrpc.c

index 65420f9..20c4a71 100644 (file)
@@ -3586,7 +3586,7 @@ SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle,
     }
 
     /* Allocate the names array */
-    Names->Element = midl_user_allocate(Count * sizeof(ULONG));
+    Names->Element = midl_user_allocate(Count * sizeof(*Names->Element));
     if (Names->Element == NULL)
     {
         Status = STATUS_INSUFFICIENT_RESOURCES;
@@ -3594,7 +3594,7 @@ SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle,
     }
 
     /* Allocate the use array */
-    Use->Element = midl_user_allocate(Count * sizeof(ULONG));
+    Use->Element = midl_user_allocate(Count * sizeof(*Use->Element));
     if (Use->Element == NULL)
     {
         Status = STATUS_INSUFFICIENT_RESOURCES;