kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
January 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
38 participants
530 discussions
Start a n
N
ew thread
git:master:ea3df285: socket_info.c: logging: DBG -> LM_DBG
by Ovidiu Sas
Module: kamailio Branch: master Commit: ea3df285e8dc8f162e3824ad3247b8f9ee57e5dd URL:
https://github.com/kamailio/kamailio/commit/ea3df285e8dc8f162e3824ad3247b8f…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2015-01-13T09:54:09-05:00 socket_info.c: logging: DBG -> LM_DBG --- Modified: socket_info.c --- Diff:
https://github.com/kamailio/kamailio/commit/ea3df285e8dc8f162e3824ad3247b8f…
Patch:
https://github.com/kamailio/kamailio/commit/ea3df285e8dc8f162e3824ad3247b8f…
--- diff --git a/socket_info.c b/socket_info.c index 765ffa3..75d09da 100644 --- a/socket_info.c +++ b/socket_info.c @@ -555,16 +555,14 @@ struct socket_info* grep_sock_info(str* host, unsigned short port, if (list==0) /* disabled or unknown protocol */ continue; for (si=*list; si; si=si->next){ - DBG("grep_sock_info - checking if host==us: %d==%d &&" - " [%.*s] == [%.*s]\n", + LM_DBG("checking if host==us: %d==%d && [%.*s] == [%.*s]\n", hname.len, si->name.len, hname.len, hname.s, si->name.len, si->name.s ); if (port) { - DBG("grep_sock_info - checking if port %d (advertise %d)" - " matches port %d\n", + LM_DBG("checking if port %d (advertise %d) matches port %d\n", si->port_no, si->useinfo.port_no, port); if (si->port_no!=port && si->useinfo.port_no!=port) { continue; @@ -575,7 +573,7 @@ struct socket_info* grep_sock_info(str* host, unsigned short port, goto found; if(si->useinfo.name.s!=NULL) { - DBG("grep_sock_info - checking advertise if host==us:" + LM_DBG("checking advertise if host==us:" " %d==%d && [%.*s] == [%.*s]\n", hname.len, si->useinfo.name.len, @@ -632,8 +630,7 @@ struct socket_info* grep_sock_info_by_port(unsigned short port, continue; for (si=*list; si; si=si->next){ - DBG("grep_sock_info_by_port - checking if port %d matches" - " port %d\n", si->port_no, port); + LM_DBG("checking if port %d matches port %d\n", si->port_no, port); if (si->port_no==port) { goto found; } @@ -1160,9 +1157,10 @@ int add_interfaces_via_netlink(char* if_name, int family, unsigned short port, //if(! (ifaces[i].flags & IFF_UP) ) continue; for(tmp = ifaces[i].addresses; tmp; tmp = tmp->next){ - LM_DBG("\t in add_iface_via_netlink Name %s Address %s\n", ifaces[i].name, tmp->addr); - /* match family */ - if (family == tmp->family){ + LM_DBG("in add_iface_via_netlink Name %s Address %s\n", + ifaces[i].name, tmp->addr); + /* match family */ + if (family == tmp->family){ /* check if loopback */ if (ifaces[i].flags & IFF_LOOPBACK){ LM_DBG("INTERFACE %s is loopback", ifaces[i].name); @@ -1542,7 +1540,7 @@ static int fix_socket_list(struct socket_info **list, int* type_flags) } /* get ips & fill the port numbers*/ #ifdef EXTRA_DEBUG - DBG("Listening on \n"); + LM_DBG("Listening on\n"); #endif for (si=*list;si;si=si->next){ /* fix port number, port_no should be !=0 here */
9 years, 11 months
1
0
0
0
git:master:4a4da127: tcp_read.c: logging: DBG -> LM_DBG
by Ovidiu Sas
Module: kamailio Branch: master Commit: 4a4da127d03fffb5df30421d31a7bb211a31a24d URL:
https://github.com/kamailio/kamailio/commit/4a4da127d03fffb5df30421d31a7bb2…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2015-01-13T09:48:36-05:00 tcp_read.c: logging: DBG -> LM_DBG --- Modified: tcp_read.c --- Diff:
https://github.com/kamailio/kamailio/commit/4a4da127d03fffb5df30421d31a7bb2…
Patch:
https://github.com/kamailio/kamailio/commit/4a4da127d03fffb5df30421d31a7bb2…
9 years, 11 months
1
0
0
0
git:master:842b24af: timer.c: logging: DBG -> LM_DBG
by Ovidiu Sas
Module: kamailio Branch: master Commit: 842b24af14983cb9cdebad99e526330ed9ae0696 URL:
https://github.com/kamailio/kamailio/commit/842b24af14983cb9cdebad99e526330…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2015-01-13T09:40:27-05:00 timer.c: logging: DBG -> LM_DBG --- Modified: timer.c --- Diff:
https://github.com/kamailio/kamailio/commit/842b24af14983cb9cdebad99e526330…
Patch:
https://github.com/kamailio/kamailio/commit/842b24af14983cb9cdebad99e526330…
--- diff --git a/timer.c b/timer.c index 13c354a..d5e9e72 100644 --- a/timer.c +++ b/timer.c @@ -441,7 +441,7 @@ inline static void adjust_ticks(void) (long)(delta*1000)/TIMER_TICKS_HZ, (long)delta); *ticks+=(ticks_t)delta; }else{ - /*DBG("incredible, but our timer is in sync with" + /*LM_DBG("incredible, but our timer is in sync with" " real time (%lu)\n", (unsigned long)*ticks); */ }
9 years, 11 months
1
0
0
0
git:master:46f98db6: timer.c: logging: DBG -> LM_DBG
by Ovidiu Sas
Module: kamailio Branch: master Commit: 46f98db670d087ce1a5bfd061abf4b3dbc6ae603 URL:
https://github.com/kamailio/kamailio/commit/46f98db670d087ce1a5bfd061abf4b3…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2015-01-13T09:38:39-05:00 timer.c: logging: DBG -> LM_DBG --- Modified: timer.c --- Diff:
https://github.com/kamailio/kamailio/commit/46f98db670d087ce1a5bfd061abf4b3…
Patch:
https://github.com/kamailio/kamailio/commit/46f98db670d087ce1a5bfd061abf4b3…
--- diff --git a/timer.c b/timer.c index 47c1c7b..13c354a 100644 --- a/timer.c +++ b/timer.c @@ -252,7 +252,7 @@ int init_timer() goto error; } last_time=start_time; - DBG("init_timer: starting with *ticks=%u\n", (unsigned) *ticks); + LM_DBG("starting with *ticks=%u\n", (unsigned) *ticks); /* init timer structures */ for (r=0; r<H0_ENTRIES; r++) @@ -293,7 +293,7 @@ int init_timer() #endif - DBG("init_timer: timer_list between %p and %p\n", + LM_DBG("timer_list between %p and %p\n", &timer_lst->h0[0], &timer_lst->h2[H2_ENTRIES]); return 0; error: @@ -435,7 +435,7 @@ inline static void adjust_ticks(void) #ifndef TIMER_DEBUG if (delta > 2*(s_ticks_t)TIMER_MAX_DRIFT+1) #endif - DBG("adjusting timer ticks (%lu) with %ld ms" + LM_DBG("adjusting timer ticks (%lu) with %ld ms" " (%ld ticks)\n", (unsigned long)*ticks, (long)(delta*1000)/TIMER_TICKS_HZ, (long)delta); @@ -570,7 +570,7 @@ int timer_add_safe(struct timer_ln* tl, ticks_t delta) tl->del_calls, tl->del_func, tl->del_file, tl->del_line, tl->init, tl->expires_no); #else - DBG("timer_add called on an active timer %p (%p, %p)," + LM_DBG("timer_add called on an active timer %p (%p, %p)," " flags %x\n", tl, tl->next, tl->prev, tl->flags); #endif ret=-1; /* refusing to add active or non-reinit. timer */ @@ -629,7 +629,7 @@ int timer_del_safe(struct timer_ln* tl) tl->init, tl->expires_no); #else /* - DBG("timer_del called on an inactive timer %p (%p, %p)," + LM_DBG("called on an inactive timer %p (%p, %p)," " flags %x\n", tl, tl->next, tl->prev, tl->flags); */ #endif @@ -695,7 +695,7 @@ int timer_del_safe(struct timer_ln* tl) tl->init, tl->expires_no); #else /* - DBG("timer_del: (s) timer %p (%p, %p) flags %x " + LM_DBG("(s) timer %p (%p, %p) flags %x " "already detached\n", tl, tl->next, tl->prev, tl->flags); */ @@ -765,7 +765,7 @@ int timer_del_safe(struct timer_ln* tl) tl->init, tl->expires_no); #else /* - DBG("timer_del: (f) timer %p (%p, %p) flags %x " + LM_DBG("(f) timer %p (%p, %p) flags %x " "already detached\n", tl, tl->next, tl->prev, tl->flags); */ @@ -828,7 +828,7 @@ inline static void timer_list_expire(ticks_t t, struct timer_head* h first=h->next; #endif - /*DBG("timer_list_expire @ ticks = %lu, list =%p\n", + /*LM_DBG("@ ticks = %lu, list =%p\n", (unsigned long) *ticks, h); */ while(h->next!=(struct timer_ln*)h){ @@ -914,7 +914,7 @@ static void timer_handler(void) i=(slow_idx_t)(*t_idx%SLOW_LISTS_NO); #endif - /*DBG("timer_handler: called, ticks=%lu, prev_ticks=%lu\n", + /*LM_DBG("called, ticks=%lu, prev_ticks=%lu\n", (unsigned long)*ticks, (unsigned long)prev_ticks); */ run_timer=0; /* reset run_timer */ @@ -989,7 +989,7 @@ static ticks_t compat_old_handler(ticks_t ti, struct timer_ln* tl, struct sr_timer* t; #ifdef TIMER_DEBUG - DBG("timer: compat_old_handler: calling, ticks=%u/%u, tl=%p, t=%p\n", + LM_DBG("calling, ticks=%u/%u, tl=%p, t=%p\n", prev_ticks, (unsigned)*ticks, tl, data); #endif t=(struct sr_timer*)data;
9 years, 11 months
1
0
0
0
git:master:e44f53c0: udp_server.c: logging: DBG -> LM_DBG
by Ovidiu Sas
Module: kamailio Branch: master Commit: e44f53c09be3869827d1fdf5cb75f7a3916d083b URL:
https://github.com/kamailio/kamailio/commit/e44f53c09be3869827d1fdf5cb75f7a…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2015-01-13T09:33:57-05:00 udp_server.c: logging: DBG -> LM_DBG --- Modified: udp_server.c --- Diff:
https://github.com/kamailio/kamailio/commit/e44f53c09be3869827d1fdf5cb75f7a…
Patch:
https://github.com/kamailio/kamailio/commit/e44f53c09be3869827d1fdf5cb75f7a…
--- diff --git a/udp_server.c b/udp_server.c index 9e782d4..5105456 100644 --- a/udp_server.c +++ b/udp_server.c @@ -90,7 +90,7 @@ static int dbg_msg_qa(char *buf, int len) case ' ': if (state==QA_SPACE) { space_cnt++; if (space_cnt==4) { - LM_CRIT("DBG_MSG_QA: too many spaces\n"); + LM_CRIT("too many spaces\n"); return 0; } } else space_cnt=0; @@ -422,7 +422,7 @@ int udp_rcv_loop() &fromlen); if (len==-1){ if (errno==EAGAIN){ - DBG("udp_rcv_loop: packet with bad checksum received\n"); + LM_DBG("packet with bad checksum received\n"); continue; } LM_ERR("recvfrom:[%d] %s\n", errno, strerror(errno)); @@ -452,8 +452,7 @@ int udp_rcv_loop() if (!unlikely(sr_event_enabled(SREV_STUN_IN)) || (unsigned char)*buf != 0x00) { if (len<MIN_UDP_PACKET) { tmp=ip_addr2a(&ri.src_ip); - DBG("udp_rcv_loop: probing packet received from %s %d\n", - tmp, htons(ri.src_port)); + LM_DBG("probing packet received from %s %d\n", tmp, htons(ri.src_port)); continue; } }
9 years, 11 months
1
0
0
0
git:master:3abd770a: usr_avp.c: logging: DBG -> LM_DBG
by Ovidiu Sas
Module: kamailio Branch: master Commit: 3abd770aa985e8cd74d1e976056445193fc55f36 URL:
https://github.com/kamailio/kamailio/commit/3abd770aa985e8cd74d1e9760564451…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2015-01-13T09:30:40-05:00 usr_avp.c: logging: DBG -> LM_DBG --- Modified: usr_avp.c --- Diff:
https://github.com/kamailio/kamailio/commit/3abd770aa985e8cd74d1e9760564451…
Patch:
https://github.com/kamailio/kamailio/commit/3abd770aa985e8cd74d1e9760564451…
--- diff --git a/usr_avp.c b/usr_avp.c index 6168386..96b877b 100644 --- a/usr_avp.c +++ b/usr_avp.c @@ -628,7 +628,7 @@ inline void destroy_avp_list(avp_list_t* list) { avp_t *avp, *foo; - DBG("DEBUG:destroy_avp_list: destroying list %p\n", *list); + LM_DBG("destroying list %p\n", *list); avp = *list; while( avp ) { foo = avp; @@ -775,11 +775,11 @@ int add_avp_galias(str *alias, int type, int_str avp_name) ga->avp.name.s.len = avp_name.s.len; memcpy( ga->avp.name.s.s, avp_name.s.s, avp_name.s.len); ga->avp.name.s.s[avp_name.s.len] = 0; - DBG("DEBUG:add_avp_galias: registering <%s> for avp name <%s>\n", + LM_DBG("registering <%s> for avp name <%s>\n", ga->alias.s, ga->avp.name.s.s); } else { ga->avp.name.n = avp_name.n; - DBG("DEBUG:add_avp_galias: registering <%s> for avp id <%d>\n", + LM_DBG("registering <%s> for avp id <%d>\n", ga->alias.s, ga->avp.name.n); } @@ -879,7 +879,7 @@ int parse_avp_ident( str *name, avp_ident_t* attr) } attr->index = 0; - DBG("Parsing '%.*s'\n", name->len, name->s); + LM_DBG("Parsing '%.*s'\n", name->len, name->s); if (name->len>=2 && name->s[1]==':') { /* old fashion i: or s: */ /* WARN("i: and s: avp name syntax is deprecated!\n"); */ c = name->s[0];
9 years, 11 months
1
0
0
0
git:master:0e1b2bc9: modules/ims_registrar_scscf: added logging of return code on NOTIFY response
by Richard Good
Module: kamailio Branch: master Commit: 0e1b2bc99e04547b8a7482197412dc9b866eb320 URL:
https://github.com/kamailio/kamailio/commit/0e1b2bc99e04547b8a7482197412dc9…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: 2015-01-13T15:58:38+02:00 modules/ims_registrar_scscf: added logging of return code on NOTIFY response --- Modified: modules/ims_registrar_scscf/registrar_notify.c --- Diff:
https://github.com/kamailio/kamailio/commit/0e1b2bc99e04547b8a7482197412dc9…
Patch:
https://github.com/kamailio/kamailio/commit/0e1b2bc99e04547b8a7482197412dc9…
--- diff --git a/modules/ims_registrar_scscf/registrar_notify.c b/modules/ims_registrar_scscf/registrar_notify.c index 5f131d9..1831b9f 100644 --- a/modules/ims_registrar_scscf/registrar_notify.c +++ b/modules/ims_registrar_scscf/registrar_notify.c @@ -1764,7 +1764,7 @@ str get_reginfo_partial(impurecord_t *r, ucontact_t *c, int event_type) { * Callback for the UAC response to NOTIFY */ void uac_request_cb(struct cell *t, int type, struct tmcb_params * ps) { - LM_DBG("DBG:uac_request_cb: Type %d\n", type); + LM_DBG("DBG: uac_request_cb on response to NOTIFY: Type %d and code %d\n", type, ps->code); } static int free_tm_dlg(dlg_t * td) {
9 years, 11 months
2
2
0
0
git:master:4ab89ca3: modules/ims_registrar_scscf: improved log line
by Richard Good
Module: kamailio Branch: master Commit: 4ab89ca37c55f6631a37681d1937c47d6ac158d8 URL:
https://github.com/kamailio/kamailio/commit/4ab89ca37c55f6631a37681d1937c47…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: 2015-01-13T16:16:13+02:00 modules/ims_registrar_scscf: improved log line --- Modified: modules/ims_registrar_scscf/registrar_notify.c --- Diff:
https://github.com/kamailio/kamailio/commit/4ab89ca37c55f6631a37681d1937c47…
Patch:
https://github.com/kamailio/kamailio/commit/4ab89ca37c55f6631a37681d1937c47…
--- diff --git a/modules/ims_registrar_scscf/registrar_notify.c b/modules/ims_registrar_scscf/registrar_notify.c index 1831b9f..38762c0 100644 --- a/modules/ims_registrar_scscf/registrar_notify.c +++ b/modules/ims_registrar_scscf/registrar_notify.c @@ -1764,7 +1764,7 @@ str get_reginfo_partial(impurecord_t *r, ucontact_t *c, int event_type) { * Callback for the UAC response to NOTIFY */ void uac_request_cb(struct cell *t, int type, struct tmcb_params * ps) { - LM_DBG("DBG: uac_request_cb on response to NOTIFY: Type %d and code %d\n", type, ps->code); + LM_DBG("received NOTIFY reply type [%d] and code [%d]\n", type, ps->code); } static int free_tm_dlg(dlg_t * td) {
9 years, 11 months
1
0
0
0
git:4.1:d872d520: exec: proper handling of empty headers for exec_bash_safety
by Daniel-Constantin Mierla
Module: kamailio Branch: 4.1 Commit: d872d5203507c017e80f7eb29f2be13d11088baf URL:
https://github.com/kamailio/kamailio/commit/d872d5203507c017e80f7eb29f2be13…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-01-13T12:42:32+01:00 exec: proper handling of empty headers for exec_bash_safety (cherry picked from commit ae491ab355f0b2441bc20060154107b9163597de) (cherry picked from commit d08a925872aa9bb2b22552171281cbe18783cbef) --- Modified: modules/exec/exec_hf.c --- Diff:
https://github.com/kamailio/kamailio/commit/d872d5203507c017e80f7eb29f2be13…
Patch:
https://github.com/kamailio/kamailio/commit/d872d5203507c017e80f7eb29f2be13…
--- diff --git a/modules/exec/exec_hf.c b/modules/exec/exec_hf.c index 60c5312..85c4d40 100644 --- a/modules/exec/exec_hf.c +++ b/modules/exec/exec_hf.c @@ -258,8 +258,8 @@ static int print_hf_var(struct hf_wrapper *w, int offset) memcpy(envvar, w->prefix, w->prefix_len); c=envvar+w->prefix_len; memcpy(c, hname, hlen ); c+=hlen; *c=EV_ASSIGN;c++; - if (exec_bash_safety && !strncmp(w->u.hf->body.s, "() {", - MIN(w->u.hf->body.len,4))) { + if (exec_bash_safety && w->u.hf->body.len>=4 + && !strncmp(w->u.hf->body.s, "() {", 4)) { memcpy(c, w->u.hf->body.s+offset+2, w->u.hf->body.len-2 ); c+=(w->u.hf->body.len-2); } else { @@ -268,8 +268,8 @@ static int print_hf_var(struct hf_wrapper *w, int offset) } for(wi=w->next_same; wi; wi=wi->next_same) { *c=HF_SEPARATOR;c++; - if (exec_bash_safety && !strncmp(wi->u.hf->body.s, "() {", - MIN(w->u.hf->body.len,4))) { + if (exec_bash_safety && wi->u.hf->body.len>=4 + && !strncmp(wi->u.hf->body.s, "() {", 4)) { memcpy(c, wi->u.hf->body.s+offset+2, wi->u.hf->body.len-2 ); c+=(wi->u.hf->body.len-2); } else {
9 years, 11 months
1
0
0
0
git:4.2:d08a9258: exec: proper handling of empty headers for exec_bash_safety
by Daniel-Constantin Mierla
Module: kamailio Branch: 4.2 Commit: d08a925872aa9bb2b22552171281cbe18783cbef URL:
https://github.com/kamailio/kamailio/commit/d08a925872aa9bb2b22552171281cbe…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-01-13T12:41:05+01:00 exec: proper handling of empty headers for exec_bash_safety (cherry picked from commit ae491ab355f0b2441bc20060154107b9163597de) --- Modified: modules/exec/exec_hf.c --- Diff:
https://github.com/kamailio/kamailio/commit/d08a925872aa9bb2b22552171281cbe…
Patch:
https://github.com/kamailio/kamailio/commit/d08a925872aa9bb2b22552171281cbe…
--- diff --git a/modules/exec/exec_hf.c b/modules/exec/exec_hf.c index bed4541..bbdbaaf 100644 --- a/modules/exec/exec_hf.c +++ b/modules/exec/exec_hf.c @@ -258,8 +258,8 @@ static int print_hf_var(struct hf_wrapper *w, int offset) memcpy(envvar, w->prefix, w->prefix_len); c=envvar+w->prefix_len; memcpy(c, hname, hlen ); c+=hlen; *c=EV_ASSIGN;c++; - if (exec_bash_safety && !strncmp(w->u.hf->body.s, "() {", - MIN(w->u.hf->body.len,4))) { + if (exec_bash_safety && w->u.hf->body.len>=4 + && !strncmp(w->u.hf->body.s, "() {", 4)) { memcpy(c, w->u.hf->body.s+offset+2, w->u.hf->body.len-2 ); c+=(w->u.hf->body.len-2); } else { @@ -268,8 +268,8 @@ static int print_hf_var(struct hf_wrapper *w, int offset) } for(wi=w->next_same; wi; wi=wi->next_same) { *c=HF_SEPARATOR;c++; - if (exec_bash_safety && !strncmp(wi->u.hf->body.s, "() {", - MIN(w->u.hf->body.len,4))) { + if (exec_bash_safety && wi->u.hf->body.len>=4 + && !strncmp(wi->u.hf->body.s, "() {", 4)) { memcpy(c, wi->u.hf->body.s+offset+2, wi->u.hf->body.len-2 ); c+=(wi->u.hf->body.len-2); } else {
9 years, 11 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
53
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Results per page:
10
25
50
100
200