Browse Source

MT#63317 re-fix extension parsing

Basically a revert of Ie62fa4ed

Maybe this is correct now?

Change-Id: Ia2b1b5d35c2a209430a23110f1b929e2b1ac80fb
rfuchs/2000
Richard Fuchs 4 months ago
parent
commit
8a3d8c911d
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      kernel-module/xt_RTPENGINE.c
  2. +1
    -1
      lib/rtplib.c

+ 1
- 1
kernel-module/xt_RTPENGINE.c View File

@ -5153,7 +5153,7 @@ static void parse_rtp(struct rtp_parsed *rtp, struct sk_buff *skb) {
if (rtp->payload_len < sizeof(*ext))
goto error;
ext = (void *) rtp->payload;
ext_len = sizeof(*ext) + 4 + ntohs(ext->length) * 4;
ext_len = sizeof(*ext) + ntohs(ext->length) * 4;
if (rtp->payload_len < ext_len)
goto error;
rtp->payload += ext_len;


+ 1
- 1
lib/rtplib.c View File

@ -91,7 +91,7 @@ int rtp_payload(struct rtp_header **out, str *p, const str *s) {
goto error;
ext = (void *) p->s;
err = "short packet (header extensions)";
if (str_shift(p, sizeof(*ext) + 4 + ntohs(ext->length) * 4))
if (str_shift(p, sizeof(*ext) + ntohs(ext->length) * 4))
goto error;
}


Loading…
Cancel
Save