From a001f23ad3ee85c122e08a72ff2f7cb5bd7b9138 Mon Sep 17 00:00:00 2001 From: nnposter Date: Tue, 7 Nov 2017 22:17:56 +0000 Subject: [PATCH] Removes (redundant) pointer check for a fixed stack-based buffer. Fixes #1061 --- nping/ProbeMode.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nping/ProbeMode.cc b/nping/ProbeMode.cc index e3c01b7d8..fbcaf2f3b 100644 --- a/nping/ProbeMode.cc +++ b/nping/ProbeMode.cc @@ -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 */