pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/38071?usp=email )

Change subject: osmo_rtp_get_payload(): fix bounds check for padding
......................................................................

osmo_rtp_get_payload(): fix bounds check for padding

If we want to read a padding length octet from the end, payload_len must
be >= 1.

Change-Id: I071ad2f799bb4cfecf349c5a25bf7a46da6128dc
---
M src/rtp.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, approved




diff --git a/src/rtp.c b/src/rtp.c
index f4b0ada..77905f2 100644
--- a/src/rtp.c
+++ b/src/rtp.c
@@ -140,7 +140,7 @@
                }
        }
        if (rtph->padding) {
-               if (payload_len < 0) {
+               if (payload_len < 1) {
                        DEBUGPC(DLMUX, "received RTP frame too short for "
                                "padding length\n");
                        return NULL;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38071?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I071ad2f799bb4cfecf349c5a25bf7a46da6128dc
Gerrit-Change-Number: 38071
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to