Module: kamailio
Branch: 5.4
Commit: 8d6c2b96e83fc58f7159957ea86d5f91c00808ba
URL:
https://github.com/kamailio/kamailio/commit/8d6c2b96e83fc58f7159957ea86d5f9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-03-30T12:00:32+02:00
path: set dst udp uri length for decoding received value in alias format
(cherry picked from commit f90640f7cec45a359e996493ae91b1a45d2603e7)
---
Modified: src/modules/path/path.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8d6c2b96e83fc58f7159957ea86d5f9…
Patch:
https://github.com/kamailio/kamailio/commit/8d6c2b96e83fc58f7159957ea86d5f9…
---
diff --git a/src/modules/path/path.c b/src/modules/path/path.c
index 137c73b720..836cef33b7 100644
--- a/src/modules/path/path.c
+++ b/src/modules/path/path.c
@@ -441,10 +441,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;