mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
[DNSAPI]
- Check for NULL pointer in DnsQuery to avoid crashing tests svn path=/trunk/; revision=71711
This commit is contained in:
parent
f6bb8b1fb6
commit
1fd8fbb550
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue