Module: kamailio Branch: master Commit: c823f41350ab9186a323707e9be32e31922bec17 URL: https://github.com/kamailio/kamailio/commit/c823f41350ab9186a323707e9be32e31922bec17
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2024-10-22T07:41:08+02:00 core: parser sdp - check length for rtpmap extract --- Modified: src/core/parser/sdp/sdp_helpr_funcs.c --- Diff: https://github.com/kamailio/kamailio/commit/c823f41350ab9186a323707e9be32e31922bec17.diff Patch: https://github.com/kamailio/kamailio/commit/c823f41350ab9186a323707e9be32e31922bec17.patch --- diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c b/src/core/parser/sdp/sdp_helpr_funcs.c index a74f78abb84..fe5b464e473 100644 --- a/src/core/parser/sdp/sdp_helpr_funcs.c +++ b/src/core/parser/sdp/sdp_helpr_funcs.c @@ -151,6 +151,9 @@ int extract_rtpmap(str *body, str *rtpmap_payload, str *rtpmap_encoding, char *cp, *cp1; int len; + if(body->len <= 9) { + return -1; + } if(strncasecmp(body->s, "a=rtpmap:", 9) != 0) { /*LM_DBG("We are not pointing to an a=rtpmap: attribute =>`%.*s'\n", * body->len, body->s); */ _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org