Module: kamailio
Branch: master
Commit: 1e212088091183aac8fcd418656beea523950870
URL:
https://github.com/kamailio/kamailio/commit/1e212088091183aac8fcd418656beea…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-20T07:22:57+02:00
core: parse identityinfo - log message on end of buffer
---
Modified: src/core/parser/parse_identityinfo.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1e212088091183aac8fcd418656beea…
Patch:
https://github.com/kamailio/kamailio/commit/1e212088091183aac8fcd418656beea…
---
diff --git a/src/core/parser/parse_identityinfo.c b/src/core/parser/parse_identityinfo.c
index da613e798f..e58bcd26ff 100644
--- a/src/core/parser/parse_identityinfo.c
+++ b/src/core/parser/parse_identityinfo.c
@@ -311,8 +311,12 @@ void parse_identityinfo(char *buffer, char *end, struct
identityinfo_body *ii_b)
return ;
parseerror:
- LM_ERR("unexpected char [%c] in status %d: <<%.*s>> .\n",
- *p,status, (int)(p-buffer), ZSW(p));
+ if(p<end) {
+ LM_ERR("unexpected char [%c] in status %d: <<%.*s>> .\n",
+ *p, status, (int)(p-buffer), ZSW(p));
+ } else {
+ LM_ERR("unexpected end of buffer - status %d\n", status);
+ }
return ;
}