Alistair Leslie-Hughes : ntdll: Check return parameter before use.

Alexandre Julliard julliard at winehq.org
Tue Jul 19 15:55:01 CDT 2022


Module: wine
Branch: master
Commit: 0cbfd7ab4cd1b4102bfd6204ff4ed64cca8f5b55
URL:    https://gitlab.winehq.org/wine/wine/-/commit/0cbfd7ab4cd1b4102bfd6204ff4ed64cca8f5b55

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Mar  3 08:56:39 2021 +1100

ntdll: Check return parameter before use.

---

 dlls/ntdll/sec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c
index ba11000564e..ba8d7b71593 100644
--- a/dlls/ntdll/sec.c
+++ b/dlls/ntdll/sec.c
@@ -1172,6 +1172,8 @@ NTSTATUS WINAPI RtlAddAce(
 		return STATUS_INVALID_PARAMETER;
 	if (!RtlFirstFreeAce(acl,&targetace))
 		return STATUS_INVALID_PARAMETER;
+	if (!targetace)
+		return STATUS_ALLOTTED_SPACE_EXCEEDED;
 	nrofaces=0;ace=acestart;
 	while (((BYTE *)ace - (BYTE *)acestart) < acelen) {
 		nrofaces++;




More information about the wine-cvs mailing list