Skip to content

Commit

Permalink
Merge pull request #313 from jelu/codeql-unsigned-diff
Browse files Browse the repository at this point in the history
CodeQL
  • Loading branch information
jelu authored Aug 30, 2024
2 parents 434d632 + 855f037 commit c58a4b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ pcap_handle_tcp_segment(u_char* segment, int len, uint32_t seq, tcpstate_t* tcps
for (s = 0; s < MAX_TCP_SEGS; s++) {
if (!tcpstate->segbuf[s])
continue;
/* TODO: seq >= 0 */
if (tcpstate->segbuf[s]->seq - seq > 0 && tcpstate->segbuf[s]->seq - seq < dnslen) {
if ((int64_t)tcpstate->segbuf[s]->seq - seq > 0 && (int64_t)tcpstate->segbuf[s]->seq - seq < dnslen) {
tcp_segbuf_t* segbuf = tcpstate->segbuf[s];
tcpstate->segbuf[s] = NULL;
dfprintf(1, "pcap_handle_tcp_segment: %s", "message reassembled");
Expand Down

0 comments on commit c58a4b4

Please sign in to comment.