Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix size of chunks

  • Loading branch information...
commit f029ee1906c616f0f0d94ef723c3a3fae635ea3e 1 parent 989bb18
@ates authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 c_src/epcap.c
View
4 c_src/epcap.c
@@ -298,9 +298,13 @@ void epcap_response(struct pcap_pkthdr *hdr, const u_char *pkt, uint16_t dl)
{
sctp_data = (sctp_chunk_data_t *)tmp;
chunk_size = sctp_chunk_length(sctp_data->len);
+ if (chunk_size <= 4)
+ chunk_size = 4;
switch(*tmp)
{
case 0: /* SCTP DATA chunk */
+ if (chunk_size <= 16) break;
+
if (ntohl(sctp_data->ppi) == SCTP_PAYLOAD_M3UA) {
payload = tmp + SCTP_CHUNK_DATA_HEADER_LENGTH;
push(&list, payload, chunk_size - SCTP_CHUNK_DATA_HEADER_LENGTH);
Please sign in to comment.
Something went wrong with that request. Please try again.