Module: kamailio Branch: master Commit: 20db418f1e35f31d7a90d7cabbd22ae989b7266c URL: https://github.com/kamailio/kamailio/commit/20db418f1e35f31d7a90d7cabbd22ae9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-09-08T10:00:56+02:00
core: parser contact - proper update of length in skip_name()
- stop walking name also for unquoted ;, being special char - small typo
---
Modified: src/core/parser/contact/contact.c
---
Diff: https://github.com/kamailio/kamailio/commit/20db418f1e35f31d7a90d7cabbd22ae9... Patch: https://github.com/kamailio/kamailio/commit/20db418f1e35f31d7a90d7cabbd22ae9...
---
diff --git a/src/core/parser/contact/contact.c b/src/core/parser/contact/contact.c index 8c6ebdd6bb..345167022f 100644 --- a/src/core/parser/contact/contact.c +++ b/src/core/parser/contact/contact.c @@ -147,10 +147,10 @@ static inline int skip_name(str* _s) return 0; }
- if (*p == ':') { + if (*p == ':' || *p == ';') { if (last_wsp) { - _s->s = last_wsp; _s->len -= last_wsp - _s->s + 1; + _s->s = last_wsp; } return 0; } @@ -224,7 +224,7 @@ int parse_contacts(str* _s, contact_t** _c)
trim(&c->uri); if((c->uri.len <= 0) || (c->uri.s + c->uri.len > sv.s + sv.len)) { - LM_ERR("invlid contact uri\n"); + LM_ERR("invalid contact uri\n"); goto error; }