mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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:
committed by
Holger Hans Peter Freyther
parent
33b9641025
commit
d9e4039516
@@ -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;
|
||||
|
Reference in New Issue
Block a user