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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-01-26T18:07:54+01:00

core/parser/sdp: proper test for media ip separator

---

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

---

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

---

diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c 
b/src/core/parser/sdp/sdp_helpr_funcs.c
index 61022b6148f..893ef0e58a4 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -561,7 +561,7 @@ int extract_mediaip(str *body, str *mediaip, int *pf, char 
*line)
         * - for length, at least 6: ' IP[4|6] x...'
         * - white space after
         */
-       if(cp + 6 > mediaip->s + mediaip->len && cp[4] != ' ') {
+       if(cp + 6 > mediaip->s + mediaip->len || cp[4] != ' ') {
                LM_ERR("invalid content for `%s' line\n", line);
                return -1;
        }

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to