Module: kamailio
Branch: master
Commit: d10257fbfdbb3e3e73c0fe60a224585822bdd7b3
URL: 
https://github.com/kamailio/kamailio/commit/d10257fbfdbb3e3e73c0fe60a224585822bdd7b3

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-10-26T07:46:01+02:00

core: parser sdp - check len gor extracting fmtp

---

Modified: src/core/parser/sdp/sdp_helpr_funcs.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/d10257fbfdbb3e3e73c0fe60a224585822bdd7b3.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d10257fbfdbb3e3e73c0fe60a224585822bdd7b3.patch

---

diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c 
b/src/core/parser/sdp/sdp_helpr_funcs.c
index fe5b464e473..0e61fe5ca5d 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -218,8 +218,12 @@ int extract_fmtp(str *body, str *fmtp_payload, str 
*fmtp_string)
        char *cp, *cp1;
        int len;
 
+       if(body->len <= 7) {
+               return -1;
+       }
        if(strncasecmp(body->s, "a=fmtp:", 7) != 0) {
-               /*LM_DBG("We are not pointing to an a=fmtp: attribute 
=>`%.*s'\n", body->len, body->s); */
+               /*LM_DBG("We are not pointing to an a=fmtp: attribute 
=>`%.*s'\n",
+                * body->len, body->s); */
                return -1;
        }
 

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to