Module: kamailio Branch: master Commit: 5989ab742685840019dea65c34df7a535d3950b8 URL: https://github.com/kamailio/kamailio/commit/5989ab742685840019dea65c34df7a53...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-08-08T21:35:06+02:00
path: fix offset to set ending 0 for received_format=1
---
Modified: src/modules/path/path.c
---
Diff: https://github.com/kamailio/kamailio/commit/5989ab742685840019dea65c34df7a53... Patch: https://github.com/kamailio/kamailio/commit/5989ab742685840019dea65c34df7a53...
---
diff --git a/src/modules/path/path.c b/src/modules/path/path.c index 01d49253ec..2f1d84e8e2 100644 --- a/src/modules/path/path.c +++ b/src/modules/path/path.c @@ -387,7 +387,7 @@ void path_rr_callback(struct sip_msg *_m, str *r_param, void *cb_param) strncpy(dst_uri_buf, "sip:", 4); strncpy(dst_uri_buf+4, hooks.contact.received->body.s, hooks.contact.received->body.len); - dst_uri_buf[hooks.contact.received->body.len] = '\0'; + dst_uri_buf[4+hooks.contact.received->body.len] = '\0'; p = dst_uri_buf + 4; n = 0; while(*p!='\0') {