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

Sponsored-by: On-Waves ehf
---
 openbsc/src/libtrau/rtp_proxy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 0074b4a..4278fc6 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -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;
-- 
1.7.9.5


Reply via email to