- Check for NULL pointer in DnsQuery to avoid crashing tests

svn path=/trunk/; revision=71711
This commit is contained in:
Thomas Faber 2016-07-01 17:19:04 +00:00
parent f6bb8b1fb6
commit 1fd8fbb550

View file

@ -59,6 +59,9 @@ DnsQuery_A(LPCSTR Name,
LPSTR CurrentName;
unsigned i, CNameLoop;
if (Name == NULL)
return ERROR_INVALID_PARAMETER;
*QueryResultSet = 0;
switch(Type)
@ -200,6 +203,9 @@ DnsQuery_W(LPCWSTR Name,
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);