Module: kamailio
Branch: 6.1
Commit: ebcf4cf7363c5045708c508037bcc6929605aa85
URL: 
https://github.com/kamailio/kamailio/commit/ebcf4cf7363c5045708c508037bcc6929605aa85

Author: Victor Seva <[email protected]>
Committer: Victor Seva <[email protected]>
Date: 2026-07-06T10:29:57+02:00

pv: check proper boundaries on encode7bit transformation, take two

(cherry picked from commit 7931d82e6fa95c46bd9acaaf95ffa5dbf376d5d4)

---

Modified: src/modules/pv/pv_trans.c

---

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

---

diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c
index 98d6fd09ed0..62c4cb2fb53 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!

Reply via email to