[NSLOOKUP] Fix crash in case of no network connectivity (#1354)
authorJulian Kirsch <kirschju@sec.in.tum.de>
Wed, 13 Feb 2019 12:12:52 +0000 (13:12 +0100)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Wed, 13 Feb 2019 12:12:52 +0000 (13:12 +0100)
commit42515190c53d45e282a8d6eea4dfa917bfc1f170
treef17346dc2b8cdad47712e79523bc66517cc78ad1
parent67a3747722865bd0b85404a0b9bcaf39ca1f0dd7
[NSLOOKUP] Fix crash in case of no network connectivity (#1354)

Prevent nslookup.exe from crashing when executed in a ROS VM with no network
interfaces. This is due to a NULL pointer dereference occurring if
`GetNetworkParams` in `main` fails with an error other than
`ERROR_BUFFER_OVERFLOW`. In this case, `pNetInfo` remains initialized to
NULL, causing `strncpy` to crash.
base/applications/network/nslookup/nslookup.c