Module: kamailio
Branch: master
Commit: efce6e76ba20f7b02101fb2f44cb149b609f4bef
URL: 
https://github.com/kamailio/kamailio/commit/efce6e76ba20f7b02101fb2f44cb149b609f4bef

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-02-05T16:44:49+01:00

ims_isc: check return for parsing headers and anchor lump

---

Modified: src/modules/ims_isc/mark.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/efce6e76ba20f7b02101fb2f44cb149b609f4bef.diff
Patch: 
https://github.com/kamailio/kamailio/commit/efce6e76ba20f7b02101fb2f44cb149b609f4bef.patch

---

diff --git a/src/modules/ims_isc/mark.c b/src/modules/ims_isc/mark.c
index d97e29b30a0..cbd0c17e3cd 100644
--- a/src/modules/ims_isc/mark.c
+++ b/src/modules/ims_isc/mark.c
@@ -147,9 +147,15 @@ int isc_mark_get_from_lumps(struct sip_msg *msg, isc_mark 
*mark)
 
        memset(mark, 0, sizeof(isc_mark));
 
-       parse_headers(msg, HDR_EOH_F, 0);
+       if(parse_headers(msg, HDR_EOH_F, 0) < 0) {
+               LM_ERR("failed to parse headers\n");
+               return 0;
+       }
 
-       anchor_lump(msg, msg->headers->name.s - msg->buf, 0, 0);
+       if(anchor_lump(msg, msg->headers->name.s - msg->buf, 0, 0) == NULL) {
+               LM_ERR("failed to create the anchor lump\n");
+               return 0;
+       }
 
        lmp = msg->add_rm;
        while(lmp) {

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to