Author: tfaber
Date: Fri Jul 1 17:19:04 2016
New Revision: 71711
URL:
http://svn.reactos.org/svn/reactos?rev=71711&view=rev
Log:
[DNSAPI]
- Check for NULL pointer in DnsQuery to avoid crashing tests
Modified:
trunk/reactos/dll/win32/dnsapi/dnsapi/query.c
Modified: trunk/reactos/dll/win32/dnsapi/dnsapi/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dnsapi/dnsapi/qu…
==============================================================================
--- trunk/reactos/dll/win32/dnsapi/dnsapi/query.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dnsapi/dnsapi/query.c [iso-8859-1] Fri Jul 1 17:19:04 2016
@@ -59,6 +59,9 @@
LPSTR CurrentName;
unsigned i, CNameLoop;
+ if (Name == NULL)
+ return ERROR_INVALID_PARAMETER;
+
*QueryResultSet = 0;
switch(Type)
@@ -200,6 +203,9 @@
PDNS_RECORD QueryResultWide;
PDNS_RECORD ConvertedRecord = 0, LastRecord = 0;
+ if (Name == NULL)
+ return ERROR_INVALID_PARAMETER;
+
Buffer = DnsWToC(Name);
Status = DnsQuery_A(Buffer, Type, Options, Servers, &QueryResultWide, Reserved);