1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 00:19:01 +00:00

Removes (redundant) pointer check for a fixed stack-based buffer. Fixes #1061

This commit is contained in:
nnposter
2017-11-07 22:17:56 +00:00
parent d52df89026
commit a001f23ad3

View File

@@ -428,7 +428,7 @@ int ProbeMode::start(){
nping_fatal(QT_3, "normalProbeMode(): Error in packet creation");
}
/* Safe checks */
if (pkt == NULL || pktLen <=0)
if (pktLen <=0)
nping_fatal(QT_3, "normalProbeMode(): Invalid packet returned by fillPacket() ");
/* Store relevant info so we can pass it to the handler */
@@ -479,7 +479,7 @@ int ProbeMode::start(){
if ( fillPacket( target, 0, pkt, MAX_IP_PACKET_LEN, &pktLen, rawipsd ) != OP_SUCCESS )
nping_fatal(QT_3, "normalProbeMode(): Error in packet creation");
if (pkt == NULL || pktLen <=0)
if (pktLen <=0)
nping_fatal(QT_3, "normalProbeMode(): Error packet returned by createPacket() ");
/* Store relevant info so we can pass it to the handler */