Module: kamailio
Branch: 5.4
Commit: 81d8e4cfbb991f046ea2123c9dfa431f407aa5f1
URL:
https://github.com/kamailio/kamailio/commit/81d8e4cfbb991f046ea2123c9dfa431…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-22T08:43:04+02:00
core: parse identityinfo - log message on end of buffer
(cherry picked from commit 1e212088091183aac8fcd418656beea523950870)
(cherry picked from commit 8a6c44d2f0504f81b2ef1d97732499b5f721b4a7)
---
Modified: src/core/parser/parse_identityinfo.c
---
Diff:
https://github.com/kamailio/kamailio/commit/81d8e4cfbb991f046ea2123c9dfa431…
Patch:
https://github.com/kamailio/kamailio/commit/81d8e4cfbb991f046ea2123c9dfa431…
---
diff --git a/src/core/parser/parse_identityinfo.c b/src/core/parser/parse_identityinfo.c
index 5111ad70b4..02e11c77bd 100644
--- a/src/core/parser/parse_identityinfo.c
+++ b/src/core/parser/parse_identityinfo.c
@@ -310,8 +310,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 ;
}