[sr-dev] [kamailio/kamailio] A problem appeared after the latest changes in pv set_var_value function (Issue #2928)

alexyosifov notifications at github.com
Fri Nov 12 12:34:41 CET 2021


> Those patches were suppose to protect against a memcpy from a null pointer, which can be problematic on some systems:
> 
> * [lost PV functions: runtime error: null pointer passed as argument 2, which is declared to never be null #2913](https://github.com/kamailio/kamailio/issues/2913)
> 
> Is this happening only when assigning `$aa`, or happens for any assignment done to `$var(...)`?

Tested with pv $ai and $dd and result is the same:
**scscf kamailio.cfg code:**
 713 xlog("ai [$ai]\n");
 714 $var(var_ai) = $ai;
 715 xlog("var_ai [$var(var_ai)] len=$(var(var_ia){s.len})\n");
 716
 717 xlog("dd [$dd]\n");
 718 $var(var_dd) = $dd;
 719 xlog("var_dd [$var(var_dd)] len=$(var(var_dd){s.len})\n");

**Log output:**
19572 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=713 a=25 n=xlog                             19573 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) DEBUG: pv [pv_core.c:1327]: pv_get_pai(): no P-Asserted-Identity header
19574 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: <script>: **ai [<null>]**                                                                                                                     19575 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=714 a=63 n=assign
19576 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) DEBUG: pv [pv_core.c:1327]: pv_get_pai(): no P-Asserted-Identity header                                                                          19577 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=715 a=25 n=xlog                             19578 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: <script>: **var_ai [0] len=1**
19579 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=717 a=25 n=xlog
19580 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) DEBUG: pv [pv_core.c:1443]: pv_get_dsturi_attr(): no destination URI
19581 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: <script>: **dd [<null>]**
19582 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=718 a=63 n=assign
19583 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) DEBUG: pv [pv_core.c:1443]: pv_get_dsturi_attr(): no destination URI
19584 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=719 a=25 n=xlog
19585 Nov 12 13:30:43 ims_dev-107 kamailio_scscf[4439]:  1(4472) ERROR: <script>: **var_dd [0] len=1**


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2928#issuecomment-967033409
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211112/e0ca68a1/attachment.htm>


More information about the sr-dev mailing list