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

Author: Xenofon Karamanos <[email protected]>
Committer: Xenofon Karamanos <[email protected]>
Date: 2026-05-04T15:15:26Z

pua_bla: Verify header length

---

Modified: src/modules/pua_bla/notify.c

---

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

---

diff --git a/src/modules/pua_bla/notify.c b/src/modules/pua_bla/notify.c
index cd9c6c71641..66ca29f936a 100644
--- a/src/modules/pua_bla/notify.c
+++ b/src/modules/pua_bla/notify.c
@@ -186,6 +186,10 @@ int bla_handle_notify(struct sip_msg *msg, char *s1, char 
*s2)
        contact = ((contact_body_t *)msg->contact->parsed)->contacts->uri;
 
        /* build extra_headers with Sender*/
+       if(header_name.len + 2 + contact.len + CRLF_LEN > sizeof(buf)) {
+               LM_ERR("extra headers too long\n");
+               goto error;
+       }
        extra_headers.s = buf;
        memcpy(extra_headers.s, header_name.s, header_name.len);
        extra_headers.len = header_name.len;

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to