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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-06-10T08:21:44+02:00

core: sdp - check if space is found for extracting session version

---

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

---

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

---

diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c 
b/src/core/parser/sdp/sdp_helpr_funcs.c
index 0d18d787242..60613ff8264 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -734,7 +734,7 @@ int extract_sess_version(str *oline, str *sess_version)
                i++;
        } while((cp < oline->s + oline->len) && i < 3);
 
-       if(cp >= oline->s + oline->len) {
+       if(cp == NULL || cp0 == NULL || cp >= oline->s + oline->len) {
                LM_ERR("broken o= line - version field not found\n");
                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