Module: kamailio
Branch: master
Commit: a9dc0f738f448676b8a92818d442ca7142147f9b
URL:
https://github.com/kamailio/kamailio/commit/a9dc0f738f448676b8a92818d442ca7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-02T13:30:46+02:00
pv: use safer function to parse header name in short buffer
---
Modified: modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a9dc0f738f448676b8a92818d442ca7…
Patch:
https://github.com/kamailio/kamailio/commit/a9dc0f738f448676b8a92818d442ca7…
---
diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c
index 85b6351..9ce9da2 100644
--- a/modules/pv/pv_core.c
+++ b/modules/pv/pv_core.c
@@ -2820,7 +2820,7 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
s.s = p;
s.len = in->len+1;
- if (parse_hname2(s.s, s.s + ((s.len<4)?4:s.len), &hdr)==0)
+ if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
{
LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
goto error;