summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libtrau
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-11-21 19:05:42 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-21 20:00:55 +0100
commitd9e403951631a44508928f60372ced5ae541c377 (patch)
tree97234f51da8288fef993258fb719b904ac36bc36 /openbsc/src/libtrau
parent33b964102511de8e2488bff75f229a4a1cae5b90 (diff)
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
Diffstat (limited to 'openbsc/src/libtrau')
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c2
1 files changed, 1 insertions, 1 deletions
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;