[PATCH] ntdll: handle info=NULL in RtlpNtEnumerateSubKey return (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Jan 31 04:55:47 CST 2009
Hi,
CID 819, handles potential info = NULL ptr better.
(Actually NtEnumerateKey will also crash and burn with info NULL,
but this is another bug I guess.)
Ciao, Marcus
---
dlls/ntdll/reg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 0d6a137..562f6b1 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -337,7 +337,7 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HANDLE handle, UNICODE_STRING *out, ULONG
out->Length = dwResultLen;
else if (!ret)
{
- if (out->Length < info->NameLength)
+ if (!info || (out->Length < info->NameLength))
{
out->Length = dwResultLen;
ret = STATUS_BUFFER_OVERFLOW;
--
1.5.6
More information about the wine-patches
mailing list