Module: kamailio Branch: master Commit: db2b9766753f4e189cda53658b3003ebebb2cdd1 URL: https://github.com/kamailio/kamailio/commit/db2b9766753f4e189cda53658b3003ebebb2cdd1
Author: Victor Seva <[email protected]> Committer: Victor Seva <[email protected]> Date: 2026-07-03T10:12:46+02:00 pv: check proper boundaries on encode7bit transformation --- Modified: src/modules/pv/pv_trans.c --- Diff: https://github.com/kamailio/kamailio/commit/db2b9766753f4e189cda53658b3003ebebb2cdd1.diff Patch: https://github.com/kamailio/kamailio/commit/db2b9766753f4e189cda53658b3003ebebb2cdd1.patch --- diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c index 98d6fd09ed0..91d6e9f66d1 100644 --- a/src/modules/pv/pv_trans.c +++ b/src/modules/pv/pv_trans.c @@ -452,7 +452,7 @@ int tr_eval_string( case TR_S_ENCODE7BIT: if(!(val->flags & PV_VAL_STR)) val->rs.s = int2str(val->ri, &val->rs.len); - if(val->rs.len > (TR_BUFFER_SIZE * 7 / 8) - 1) + if(val->rs.len > TR_BUFFER_SIZE * 2 - 1) return -1; i = pdu_7bit_encode(val->rs); memset(val, 0, sizeof(pv_value_t)); _______________________________________________ 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!
