Module: kamailio Branch: master Commit: c4c7b919b84ae861b02bc85d2fbc5bd747739b17 URL: https://github.com/kamailio/kamailio/commit/c4c7b919b84ae861b02bc85d2fbc5bd747739b17
Author: Xenofon Karamanos <[email protected]> Committer: Xenofon Karamanos <[email protected]> Date: 2026-05-04T15:01:23Z imc: Check member uri length --- Modified: src/modules/imc/imc_cmd.c --- Diff: https://github.com/kamailio/kamailio/commit/c4c7b919b84ae861b02bc85d2fbc5bd747739b17.diff Patch: https://github.com/kamailio/kamailio/commit/c4c7b919b84ae861b02bc85d2fbc5bd747739b17.patch --- diff --git a/src/modules/imc/imc_cmd.c b/src/modules/imc/imc_cmd.c index f5ded9b8cb4..009b35d4c0d 100644 --- a/src/modules/imc/imc_cmd.c +++ b/src/modules/imc/imc_cmd.c @@ -1732,6 +1732,9 @@ void imc_inv_callback(struct cell *t, int type, struct tmcb_params *ps) build_inform: body_final.s = body_buf; body_final.len = member->uri.len - 4 /* sip: part of URI */ + 20; + if(member->uri.len - 4 > sizeof(body_buf)) { + goto error; + } memcpy(body_final.s, member->uri.s + 4, member->uri.len - 4); memcpy(body_final.s + member->uri.len - 4, " is not registered. ", 21); _______________________________________________ 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!
