libsrtp: add patches that fix 2 CVEs
[feed/telephony.git] / libs / libsrtp / patches / 1010-CVE-2015-6360-1.patch
1 Index: srtp-1.4.4~dfsg/srtp/srtp.c
2 ===================================================================
3 --- srtp-1.4.4~dfsg.orig/srtp/srtp.c 2016-01-17 19:49:52.000000000 +0100
4 +++ srtp-1.4.4~dfsg/srtp/srtp.c 2016-01-17 22:50:43.000000000 +0100
5 @@ -938,6 +938,8 @@
6 srtp_hdr_xtnd_t *xtn_hdr = (srtp_hdr_xtnd_t *)enc_start;
7 enc_start += (ntohs(xtn_hdr->length) + 1);
8 }
9 + if (!((uint8_t*)enc_start < (uint8_t*)hdr + (*pkt_octet_len - tag_len)))
10 + return err_status_parse_err;
11 enc_octet_len = (uint32_t)(*pkt_octet_len - tag_len
12 - ((enc_start - (uint32_t *)hdr) << 2));
13 } else {