mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[DNSAPI]
- Check for NULL pointer in DnsQuery to avoid crashing tests svn path=/trunk/; revision=71711
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user