MT#55283 fix array out of bounds access

The PT index can be -1 or -2. Ignore RTP stats in this case.

fixes #1814

Change-Id: Ifdcdbccad592fd1a27d2b31359861ecb3e725546
mr12.2
Richard Fuchs 2 years ago
parent 85f6d11db8
commit c356402b5c

@ -5315,7 +5315,7 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct sk_buff *oskb,
skb_trim(skb, rtp.header_len + rtp.payload_len);
if (g->target.rtp_stats && ssrc_idx != -1)
if (g->target.rtp_stats && ssrc_idx != -1 && rtp_pt_idx >= 0)
rtp_stats(g, &rtp, ktime_to_us(skb->tstamp), rtp_pt_idx, ssrc_idx);
DBG("packet payload decrypted as %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x...\n",

Loading…
Cancel
Save