mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 10:29:03 +00:00
Fixed the warnings " warning: variable ‘readbuff’ set but not used [-Wunused-but-set-variable]". Added error handling in the event that readbuff was NULL.
This commit is contained in:
@@ -2183,6 +2183,9 @@ void ProbeMode::probe_udpunpriv_event_handler(nsock_pool nsp, nsock_event nse, v
|
||||
case NSE_TYPE_READ:
|
||||
/* Do an actual read() of the recv data */
|
||||
readbuff=nse_readbuf(nse, &readbytes);
|
||||
if(readbuff==NULL){
|
||||
outFatal(QT_3, "Error: nse_readbuff failed to read in the from the probe");
|
||||
}
|
||||
/* Determine which target are we dealing with */
|
||||
nsi_getlastcommunicationinfo(nsi, NULL, &family, NULL, (struct sockaddr*)&peer, sizeof(struct sockaddr_storage) );
|
||||
if(family==AF_INET6){
|
||||
|
||||
Reference in New Issue
Block a user