From a38d5307924b4828dc7534c0a9ec8ff96ce76031 Mon Sep 17 00:00:00 2001 From: Kamil Hornicek Date: Mon, 20 Oct 2008 17:06:13 +0000 Subject: [PATCH] don't deref. null pointer in case NameServer key doesn't exist svn path=/trunk/; revision=36849 --- reactos/dll/win32/iphlpapi/resinfo_reactos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/iphlpapi/resinfo_reactos.c b/reactos/dll/win32/iphlpapi/resinfo_reactos.c index a9516582038..a4625efb805 100644 --- a/reactos/dll/win32/iphlpapi/resinfo_reactos.c +++ b/reactos/dll/win32/iphlpapi/resinfo_reactos.c @@ -229,7 +229,7 @@ PIPHLP_RES_INFO getResInfo() { Str = QueryRegistryValueString( hKey, L"NameServer" ); /* If NameServer is empty */ - if (*Str == L'\0') + if (!Str || *Str == L'\0') { /* Then use DhcpNameServer */ Str = QueryRegistryValueString( hKey, L"DhcpNameServer" );