rtp: Fixed size check in padded RTP packets

This patch fixes a corner case (padding 1, payload size incl padding
0) which is not being detected correctly.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2013-11-21 19:05:42 +01:00 committed by Holger Hans Peter Freyther
parent 33b9641025
commit d9e4039516
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data)
}
}
if (rtph->padding) {
if (payload_len < 0) {
if (payload_len < 1) {
DEBUGPC(DLMUX, "received RTP frame too short for "
"padding length\n");
return -EINVAL;