Module: kamailio
Branch: master
Commit: f90640f7cec45a359e996493ae91b1a45d2603e7
URL:
https://github.com/kamailio/kamailio/commit/f90640f7cec45a359e996493ae91b1a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-03-30T11:58:53+02:00
path: set dst udp uri length for decoding received value in alias format
---
Modified: src/modules/path/path.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f90640f7cec45a359e996493ae91b1a…
Patch:
https://github.com/kamailio/kamailio/commit/f90640f7cec45a359e996493ae91b1a…
---
diff --git a/src/modules/path/path.c b/src/modules/path/path.c
index a8d95c2e51..c90aa93900 100644
--- a/src/modules/path/path.c
+++ b/src/modules/path/path.c
@@ -465,10 +465,13 @@ void path_rr_callback(struct sip_msg *_m, str *r_param, void
*cb_param)
p += 10;
memcpy(p, sproto.s, sproto.len);
p += sproto.len;
- *p = '\0';
- dst_uri.len = p - dst_uri_buf;
- break;
+ } else {
+ /* go back one byte to overwrite ';' */
+ p--;
}
+ *p = '\0';
+ dst_uri.len = p - dst_uri_buf;
+ break;
} else {
LM_ERR("invalid number of separators (%d)\n", n);
goto done;