From 7d5879d4d1f815881527b5f26efa4946ef02304e Mon Sep 17 00:00:00 2001 From: d33tah Date: Thu, 2 Jan 2014 17:18:32 +0000 Subject: [PATCH] Fix an assertion that always evaluated to true. Reported by David Binderman here: http://seclists.org/nmap-dev/2014/q1/6 --- osscan2.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osscan2.cc b/osscan2.cc index 6096dee38..6f3596d01 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -2683,7 +2683,7 @@ bool HostOsScan::processTSeqResp(HostOsScanStats *hss, struct ip *ip, int replyN bool HostOsScan::processTOpsResp(HostOsScanStats *hss, struct tcp_hdr *tcp, int replyNo) { - assert(replyNo >= 0 || replyNo < 6); + assert(replyNo >= 0 && replyNo < 6); char ops_buf[256]; bool opsParseResult; @@ -2728,7 +2728,7 @@ bool HostOsScan::processTOpsResp(HostOsScanStats *hss, struct tcp_hdr *tcp, int bool HostOsScan::processTWinResp(HostOsScanStats *hss, struct tcp_hdr *tcp, int replyNo) { - assert(replyNo >= 0 || replyNo < 6); + assert(replyNo >= 0 && replyNo < 6); if (hss->FP_TWin || hss->TWin_AVs[replyNo]) return false;