Module: kamailio
Branch: 5.8
Commit: 57efcdd1dd004fed7f6ee81353aeebf5eedb710c
URL: 
https://github.com/kamailio/kamailio/commit/57efcdd1dd004fed7f6ee81353aeebf5eedb710c

Author: S-P Chan <shihping.c...@gmail.com>
Committer: Henning Westerholt <h...@gilawa.com>
Date: 2025-07-18T07:57:49Z

core: sdp - update start pointer only after len adjustment

- len is adjusted first by the amount of chars consumed so far
- start pointer is adjusted to start new search

(cherry picked from commit c9fbf6f46898dbb2a8413a1c9d824a56241f2288)
(cherry picked from commit 9828b565e8646ab5ecebc128efb08a05a370351d)

---

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

---

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

---

diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c 
b/src/core/parser/sdp/sdp_helpr_funcs.c
index 02f72d77521..b2d76907bf8 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -330,8 +330,8 @@ int extract_candidate(str *body, sdp_stream_cell_t *stream)
 
        fl = space - start;
 
-       start = space + 1;
        len = len - (space - start + 1);
+       start = space + 1;
 
        space = memchr(start, 32, len);
        if(space == NULL) {

_______________________________________________
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