Module: kamailio
Branch: 5.5
Commit: 8a6c44d2f0504f81b2ef1d97732499b5f721b4a7
URL:
https://github.com/kamailio/kamailio/commit/8a6c44d2f0504f81b2ef1d97732499b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-22T08:39:56+02:00
core: parse identityinfo - log message on end of buffer
(cherry picked from commit 1e212088091183aac8fcd418656beea523950870)
---
Modified: src/core/parser/parse_identityinfo.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8a6c44d2f0504f81b2ef1d97732499b…
Patch:
https://github.com/kamailio/kamailio/commit/8a6c44d2f0504f81b2ef1d97732499b…
---
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 ;
}