Skip to content
Snippets Groups Projects
Commit 50cd20d5 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Try to address Coverity ID 323325.

parent 176b5623
No related branches found
No related tags found
No related merge requests found
......@@ -3366,6 +3366,7 @@ static int do_inbound_script_packet(
if (packet->flags & FLAGS_UDP_ENCAPSULATED) {
struct udp *udp;
assert(i + 2 < PACKET_MAX_HEADERS);
assert(packet->headers[i + 1].type == HEADER_UDP);
assert(packet->headers[i + 2].type == HEADER_SCTP);
packet->headers[i].total_bytes += temp_offset;
......@@ -3374,6 +3375,7 @@ static int do_inbound_script_packet(
udp = ((struct udp *)packet->sctp) - 1;
udp->len = htons(ntohs(udp->len) + temp_offset);
} else {
assert(i + 1 < PACKET_MAX_HEADERS);
assert(packet->headers[i + 1].type == HEADER_SCTP);
packet->headers[i].total_bytes += temp_offset;
packet->headers[i + 1].total_bytes += temp_offset;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment