Module: kamailio
Branch: master
Commit: 9e0fbfd9a79764fb283b6a6864e6519e167fff82
URL:
https://github.com/kamailio/kamailio/commit/9e0fbfd9a79764fb283b6a6864e6519…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-12-08T09:22:20+01:00
peering: check return code when parsing all headers
---
Modified: src/modules/peering/verify.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9e0fbfd9a79764fb283b6a6864e6519…
Patch:
https://github.com/kamailio/kamailio/commit/9e0fbfd9a79764fb283b6a6864e6519…
---
diff --git a/src/modules/peering/verify.c b/src/modules/peering/verify.c
index b3138c6fde..6865cf1b41 100644
--- a/src/modules/peering/verify.c
+++ b/src/modules/peering/verify.c
@@ -328,7 +328,10 @@ int verify_source(struct sip_msg* _msg, char* s1, char* s2)
}
/* Add P-Request-Hash header body */
- parse_headers(_msg, HDR_EOH_F, 0);
+ if(parse_headers(_msg, HDR_EOH_F, 0)<0) {
+ LM_ERR("failed to parse headers\n");
+ return -1;
+ }
for (hf = _msg->headers; hf; hf = hf->next) {
if(cmp_hdrname_strzn(&hf->name, "P-Request-Hash",
sizeof("P-Request-Hash") - 1) == 0)