mirror of
https://github.com/nmap/nmap.git
synced 2026-11-22 23:50:56 +00:00
Merge 6d1b1d7f31 into 7d19be12f3
This commit is contained in:
commit
b471e2b60a
1 changed files with 6 additions and 6 deletions
|
|
@ -822,9 +822,9 @@ int EchoClient::nep_echoed_packet_handler(nsock_pool nsp, nsock_event nse, void
|
|||
int plen=pkt_in.getTotalLength()*4;
|
||||
nping_print(DBG_4, "%s() Packet claims to have a length of %d bytes", __func__, plen);
|
||||
|
||||
/* If the packet is bigger than the maximum NEP packet, discard it. */
|
||||
if(plen>MAX_NEP_PACKET_LENGTH){
|
||||
nping_warning(DBG_1,"Warning. Received NEP packet (%dB) is bigger than %d bytes.", plen, MAX_NEP_PACKET_LENGTH);
|
||||
/* Discard packets with invalid lengths. */
|
||||
if(plen<NEP_ECHO_MIN_LEN || plen>MAX_NEP_PACKET_LENGTH){
|
||||
nping_warning(DBG_1,"Warning. Received NEP packet (%dB) has an invalid length.", plen);
|
||||
return OP_FAILURE;
|
||||
}
|
||||
|
||||
|
|
@ -905,9 +905,9 @@ int EchoClient::nep_recv_std_header_handler(nsock_pool nsp, nsock_event nse, voi
|
|||
pkt_in.storeRecvData(aux, 16);
|
||||
int plen=pkt_in.getTotalLength()*4;
|
||||
|
||||
/* If the packet is bigger than the maximum NEP packet, discard it. */
|
||||
if(plen>MAX_NEP_PACKET_LENGTH){
|
||||
nping_warning(DBG_1,"Warning. Received NEP packet (%dB) is bigger than %d bytes.", plen, MAX_NEP_PACKET_LENGTH);
|
||||
/* Discard packets with invalid lengths. */
|
||||
if(plen<NEP_ECHO_MIN_LEN || plen>MAX_NEP_PACKET_LENGTH){
|
||||
nping_warning(DBG_1,"Warning. Received NEP packet (%dB) has an invalid length.", plen);
|
||||
return OP_FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue