mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Fix crash in socket_bindtodevice: NULL device is permissible
This commit is contained in:
@@ -1120,7 +1120,9 @@ int netutil_raw_socket(const char *device) {
|
||||
netutil_perror("setsockopt(SO_BROADCAST) failed");
|
||||
}
|
||||
sethdrinclude(rawsd);
|
||||
socket_bindtodevice(rawsd, device);
|
||||
if (device) {
|
||||
socket_bindtodevice(rawsd, device);
|
||||
}
|
||||
|
||||
return rawsd;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user