From c595083f2bef2f9bf4ba6eff2f1686edf970b685 Mon Sep 17 00:00:00 2001 From: Juergen Schmied Date: Fri, 23 Oct 1998 12:06:19 +0000 Subject: [PATCH] More parameter checking in RltCopySid. --- misc/ntdll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/ntdll.c b/misc/ntdll.c index a69ab27fab4..5da4944611f 100644 --- a/misc/ntdll.c +++ b/misc/ntdll.c @@ -254,7 +254,8 @@ LPBYTE WINAPI RtlSubAuthorityCountSid(LPSID lpsid) * RtlCopySid [NTDLL.302] */ DWORD WINAPI RtlCopySid(DWORD len,LPSID to,LPSID from) -{ +{ if (!from) + return 0; if (len<(from->SubAuthorityCount*4+8)) return STATUS_BUFFER_TOO_SMALL; memmove(to,from,from->SubAuthorityCount*4+8);