MT#63317 re-fix extension parsing

Basically a revert of Ie62fa4ed

Maybe this is correct now?

Change-Id: Ia2b1b5d35c2a209430a23110f1b929e2b1ac80fb
(cherry picked from commit 8a3d8c911d)
(cherry picked from commit 4afce7e0fa)
mr11.5.1
Richard Fuchs 3 months ago
parent c09380a231
commit 89937b925b

@ -4223,7 +4223,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;

@ -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