From 077b7ac04d55054a3ee5a657327c231887636a45 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 26 Oct 2013 18:48:53 +0000 Subject: [PATCH] [SAMSRV] - Fix incorrect heap buffer size, CID 716678. svn path=/trunk/; revision=60754 --- reactos/dll/win32/samsrv/samrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/samsrv/samrpc.c b/reactos/dll/win32/samsrv/samrpc.c index 65420f9623c..20c4a71e455 100644 --- a/reactos/dll/win32/samsrv/samrpc.c +++ b/reactos/dll/win32/samsrv/samrpc.c @@ -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; -- 2.17.1