Module: kamailio Branch: master Commit: 0c101ffe713603e812759da6d396e0451cf13ba1 URL: https://github.com/kamailio/kamailio/commit/0c101ffe713603e812759da6d396e045...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2022-03-15T08:18:03+01:00
core: parse uri - detect empty user when @ is found
---
Modified: src/core/parser/parse_uri.c
---
Diff: https://github.com/kamailio/kamailio/commit/0c101ffe713603e812759da6d396e045... Patch: https://github.com/kamailio/kamailio/commit/0c101ffe713603e812759da6d396e045...
---
diff --git a/src/core/parser/parse_uri.c b/src/core/parser/parse_uri.c index 19f6f2e02a..6cbf22a7c7 100644 --- a/src/core/parser/parse_uri.c +++ b/src/core/parser/parse_uri.c @@ -434,6 +434,10 @@ int parse_uri(char* buf, int len, struct sip_uri* uri) /* found the user*/ uri->user.s=s; uri->user.len=p-s; + if(uri->user.len<=0) { + /* at '@' and no user part */ + goto error_bad_char; + } state=URI_HOST; found_user=1; s=p+1; /* skip '@' */