Module: kamailio Branch: master Commit: 48200f3e9ca9f5e5a05de440eefc23f7265b5268 URL: https://github.com/kamailio/kamailio/commit/48200f3e9ca9f5e5a05de440eefc23f7...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-04-28T15:57:05+02:00
textops: check for msg headers field in case is used for non-sip traffic
---
Modified: src/modules/textops/textops.c
---
Diff: https://github.com/kamailio/kamailio/commit/48200f3e9ca9f5e5a05de440eefc23f7... Patch: https://github.com/kamailio/kamailio/commit/48200f3e9ca9f5e5a05de440eefc23f7...
---
diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 3d90e97a90..2998906051 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -3401,7 +3401,7 @@ int add_hf_helper(struct sip_msg* msg, str *str1, str *str2, int len; str s0;
- if (parse_headers(msg, HDR_EOH_F, 0) == -1) { + if ((parse_headers(msg, HDR_EOH_F, 0) == -1) || (msg->headers == NULL)) { LM_ERR("error while parsing message\n"); return -1; }