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
December 2013
----- 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
30 participants
318 discussions
Start a n
N
ew thread
git:4.1: tm: safety checks inside t_next_contacts()
by Daniel-Constantin Mierla
Module: sip-router Branch: 4.1 Commit: f08c9545016da2bb974a1a8ded82c7aa25e9b704 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f08c954…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sat Dec 7 13:35:45 2013 +0100 tm: safety checks inside t_next_contacts() (cherry picked from commit 21027d0c17558f3a1a4797049448cbbdfe50554f) --- modules/tm/t_serial.c | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c index 93c7480..62200ad 100644 --- a/modules/tm/t_serial.c +++ b/modules/tm/t_serial.c @@ -488,14 +488,24 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) il->next = (struct instance_list *)0; set_instance(msg, &instance); } else { + instance.s = 0; instance.len = 0; } vavp = xavp_get(&ruid_name, xavp->val.v.xavp); - ruid = vavp->val.v.s; - + if (vavp != NULL) { + ruid = vavp->val.v.s; + } else { + ruid.s = 0; + ruid.len = 0; + } vavp = xavp_get(&ua_name, xavp->val.v.xavp); - location_ua = vavp->val.v.s; + if (vavp != NULL) { + location_ua = vavp->val.v.s; + } else { + location_ua.s = 0; + location_ua.len = 0; + } /* Rewrite Request-URI */ rewrite_uri(msg, &uri); @@ -582,10 +592,20 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) flags = vavp->val.v.i; vavp = xavp_get(&ruid_name, xavp->val.v.xavp); - ruid = vavp->val.v.s; + if (vavp != NULL) { + ruid = vavp->val.v.s; + } else { + ruid.s = 0; + ruid.len = 0; + } vavp = xavp_get(&ua_name, xavp->val.v.xavp); - location_ua = vavp->val.v.s; + if (vavp != NULL) { + location_ua = vavp->val.v.s; + } else { + location_ua.s = 0; + location_ua.len = 0; + } vavp = xavp_get(&instance_name, xavp->val.v.xavp); if (vavp != NULL) { @@ -623,6 +643,7 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) il = ilp; } } else { + instance.s = 0; instance.len = 0; } @@ -632,7 +653,8 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) dst_uri.len, (dst_uri.len > 0)?dst_uri.s:"", path.len, (path.len>0)?path.s:"", instance.len, (instance.len>0)?instance.s:"", - ruid.len, ruid.s, location_ua.len, location_ua.s); + ruid.len, (ruid.len>0)?ruid.s:"", + location_ua.len, (location_ua.len>0)?location_ua.s:""); if (append_branch(msg, &uri, &dst_uri, &path, 0, flags, sock, &instance, 0, &ruid, &location_ua) != 1) { LM_ERR("appending branch failed\n");
11 years
1
0
0
0
git:master: tm: safety checks inside t_next_contacts()
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 21027d0c17558f3a1a4797049448cbbdfe50554f URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=21027d0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Sat Dec 7 13:35:45 2013 +0100 tm: safety checks inside t_next_contacts() --- modules/tm/t_serial.c | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c index 93c7480..62200ad 100644 --- a/modules/tm/t_serial.c +++ b/modules/tm/t_serial.c @@ -488,14 +488,24 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) il->next = (struct instance_list *)0; set_instance(msg, &instance); } else { + instance.s = 0; instance.len = 0; } vavp = xavp_get(&ruid_name, xavp->val.v.xavp); - ruid = vavp->val.v.s; - + if (vavp != NULL) { + ruid = vavp->val.v.s; + } else { + ruid.s = 0; + ruid.len = 0; + } vavp = xavp_get(&ua_name, xavp->val.v.xavp); - location_ua = vavp->val.v.s; + if (vavp != NULL) { + location_ua = vavp->val.v.s; + } else { + location_ua.s = 0; + location_ua.len = 0; + } /* Rewrite Request-URI */ rewrite_uri(msg, &uri); @@ -582,10 +592,20 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) flags = vavp->val.v.i; vavp = xavp_get(&ruid_name, xavp->val.v.xavp); - ruid = vavp->val.v.s; + if (vavp != NULL) { + ruid = vavp->val.v.s; + } else { + ruid.s = 0; + ruid.len = 0; + } vavp = xavp_get(&ua_name, xavp->val.v.xavp); - location_ua = vavp->val.v.s; + if (vavp != NULL) { + location_ua = vavp->val.v.s; + } else { + location_ua.s = 0; + location_ua.len = 0; + } vavp = xavp_get(&instance_name, xavp->val.v.xavp); if (vavp != NULL) { @@ -623,6 +643,7 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) il = ilp; } } else { + instance.s = 0; instance.len = 0; } @@ -632,7 +653,8 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) dst_uri.len, (dst_uri.len > 0)?dst_uri.s:"", path.len, (path.len>0)?path.s:"", instance.len, (instance.len>0)?instance.s:"", - ruid.len, ruid.s, location_ua.len, location_ua.s); + ruid.len, (ruid.len>0)?ruid.s:"", + location_ua.len, (location_ua.len>0)?location_ua.s:""); if (append_branch(msg, &uri, &dst_uri, &path, 0, flags, sock, &instance, 0, &ruid, &location_ua) != 1) { LM_ERR("appending branch failed\n");
11 years
1
0
0
0
git:master: tls: removed unsigned int comparison with <0
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 7d6dc390bac2b49615444bcbad74cd39f3c82302 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7d6dc39…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 19:03:08 2013 +0100 tls: removed unsigned int comparison with <0 --- modules/tls/tls_config.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tls/tls_config.c b/modules/tls/tls_config.c index f05c211..7937876 100644 --- a/modules/tls/tls_config.c +++ b/modules/tls/tls_config.c @@ -84,7 +84,7 @@ static int parse_ipv4(struct ip_addr* ip, cfg_token_t* token, ip->len = 4; if (str2int(&token->val, &v) < 0) goto err; - if (v < 0 || v > 255) goto err; + if (v > 255) goto err; ip->u.addr[0] = v; @@ -97,7 +97,7 @@ static int parse_ipv4(struct ip_addr* ip, cfg_token_t* token, if (ret < 0) return -1; if (ret > 0 || t.type != CFG_TOKEN_ALPHA) goto err; if (str2int(&t.val, &v) < 0) goto err; - if (v < 0 || v > 255) goto err; + if (v > 255) goto err; ip->u.addr[i] = v; }
11 years
1
0
0
0
git:master: sipcapture: fixed clang compile warnings
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: b131f4402cf604bbe90123aa95a6cbc8412c2de0 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b131f44…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:54:52 2013 +0100 sipcapture: fixed clang compile warnings - extra parameters for sprintf() match format specifiers --- modules/sipcapture/sipcapture.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c index 932ba4d..913c240 100644 --- a/modules/sipcapture/sipcapture.c +++ b/modules/sipcapture/sipcapture.c @@ -486,7 +486,7 @@ int capture_mode_set_params (_capture_mode_data_t * n, str * params){ } else if (pit->name.len == 10 && strncmp (pit->name.s, "table_name", pit->name.len)==0){ - if ((n->no_tables = parse_table_names(pit->body, &n->table_names))<0){ + if ((int)(n->no_tables = parse_table_names(pit->body, &n->table_names))<0){ LM_ERR("parsing capture_mode: table name parsing failed\n"); goto error; } @@ -781,14 +781,14 @@ static int mod_init(void) { while (c){ /*for the default capture_mode, don't add it's name to the stat name*/ def = (capture_def && c == capture_def)?1:0; - stat_name = (char *)shm_malloc(sizeof (char) * snprintf(NULL, 0 , (def)?"captured_requests":"captured_requests[%.*s]", c->name.len, c->name.s) + 1); - sprintf(stat_name, (def)?"captured_requests":"captured_requests[%.*s]", c->name.len, c->name.s); + stat_name = (char *)shm_malloc(sizeof (char) * (snprintf(NULL, 0 , (def)?"captured_requests%.*s":"captured_requests[%.*s]", (def)?0:c->name.len, (def)?"":c->name.s) + 1)); + sprintf(stat_name, (def)?"captured_requests%.*s":"captured_requests[%.*s]", (def)?0:c->name.len, (def)?"":c->name.s); stats[i].name = stat_name; stats[i].flags = 0; stats[i].stat_pointer = &c->sipcapture_req; i++; - stat_name = (char *)shm_malloc(sizeof (char) * snprintf(NULL, 0 , (def)?"captured_replies":"captured_replies[%.*s]", c->name.len, c->name.s) + 1); - sprintf(stat_name, (def)?"captured_replies":"captured_replies[%.*s]", c->name.len, c->name.s); + stat_name = (char *)shm_malloc(sizeof (char) * (snprintf(NULL, 0 , (def)?"captured_replies%.*s":"captured_replies[%.*s]", (def)?0:c->name.len, (def)?"":c->name.s) + 1)); + sprintf(stat_name, (def)?"captured_replies%.*s":"captured_replies[%.*s]", (def)?0:c->name.len, (def)?"":c->name.s); stats[i].name = stat_name; stats[i].flags = 0; stats[i].stat_pointer = &c->sipcapture_rpl;
11 years
1
0
0
0
git:master: pike: memset of address print buffer with proper size
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: d54eb083f59fb55ccbc79e49b5b3e05426bd3795 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d54eb08…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:30:49 2013 +0100 pike: memset of address print buffer with proper size --- modules/pike/pike_top.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/pike/pike_top.c b/modules/pike/pike_top.c index c3d001e..8399602 100644 --- a/modules/pike/pike_top.c +++ b/modules/pike/pike_top.c @@ -13,14 +13,15 @@ static struct TopListItem_t *top_list_root = 0; static struct TopListItem_t *top_list_iter = 0; -static char buff[128]; +#define PIKE_BUFF_SIZE 128 +static char buff[PIKE_BUFF_SIZE]; struct TopListItem_t *pike_top_get_root() { return top_list_root; } char *pike_top_print_addr( unsigned char *ip, int iplen, char *buff, int buffsize ) { unsigned short *ipv6_ptr = (unsigned short *)ip; - memset( buff, 0, sizeof(buff)); + memset(buff, 0, PIKE_BUFF_SIZE*sizeof(char)); DBG("pike:top:print_addr(iplen: %d, buffsize: %d)", iplen, buffsize);
11 years
1
0
0
0
git:master: ratelimit: signed check for pipe number in rpc_set_queue()
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: ed034d4d9096d8c77269828c8efdafb26eac5372 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ed034d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:34:49 2013 +0100 ratelimit: signed check for pipe number in rpc_set_queue() - rpc can reand signed value --- modules/ratelimit/ratelimit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/ratelimit/ratelimit.c b/modules/ratelimit/ratelimit.c index 2aab068..8165ff8 100644 --- a/modules/ratelimit/ratelimit.c +++ b/modules/ratelimit/ratelimit.c @@ -1189,7 +1189,7 @@ static void rpc_set_queue(rpc_t *rpc, void *c) { if (rpc->scan(c, "dSd", &queue_no, &method, &pipe_no) < 3) return; - if (pipe_no >= MAX_PIPES || pipe_no < 0) { + if (pipe_no >= MAX_PIPES || (int)pipe_no < 0) { LM_ERR("Invalid pipe number: %d\n", pipe_no); rpc->fault(c, 400, "Invalid pipe number"); return;
11 years
1
0
0
0
git:master: permissions: signess warning fix
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 26e04f2053c9f33333bbbf79af6897428a1d9a88 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=26e04f2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:25:30 2013 +0100 permissions: signess warning fix --- modules/permissions/address.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/permissions/address.c b/modules/permissions/address.c index 6dc3275..2600086 100644 --- a/modules/permissions/address.c +++ b/modules/permissions/address.c @@ -191,12 +191,12 @@ int reload_address_table(void) // goto dberror; } else { if(ipa->af == AF_INET6) { - if(mask<0 || mask>128) { + if((int)mask<0 || mask>128) { LM_DBG("failure during IP mask check for v6\n"); goto dberror; } } else { - if(mask<0 || mask>32) { + if((int)mask<0 || mask>32) { LM_DBG("failure during IP mask check for v4\n"); goto dberror; }
11 years
1
0
0
0
git:master: maxforwards: use standard format instead of GNU old-style field designator
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: cd04947b0ccb1c861274483f458bfc7f4329accb URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cd04947…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:23:17 2013 +0100 maxforwards: use standard format instead of GNU old-style field designator --- modules/maxfwd/maxfwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/maxfwd/maxfwd.c b/modules/maxfwd/maxfwd.c index 01e64a6..371a1aa 100644 --- a/modules/maxfwd/maxfwd.c +++ b/modules/maxfwd/maxfwd.c @@ -55,7 +55,7 @@ struct cfg_group_maxfwd { }; static struct cfg_group_maxfwd default_maxfwd_cfg = { - max_limit:16 + .max_limit=16 }; static void *maxfwd_cfg = &default_maxfwd_cfg;
11 years
1
0
0
0
git:master: acc: strftime() returns 0 on error
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 89262590e4d47e480fb4984f18e12b4e4edb4ca6 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8926259…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:18:48 2013 +0100 acc: strftime() returns 0 on error --- modules/acc/acc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/acc/acc.c b/modules/acc/acc.c index efaebc0..c44a9e4 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c @@ -301,7 +301,7 @@ int acc_log_request( struct sip_msg *rq) t = gmtime(&acc_env.ts); } if(strftime(acc_time_format_buf, ACC_TIME_FORMAT_SIZE, - acc_time_format, t)<0) { + acc_time_format, t)<=0) { acc_time_format_buf[0] = '\0'; } LM_GEN2(log_facility, log_level, "%.*stimestamp=%lu;%s=%s%s", @@ -463,7 +463,7 @@ int acc_db_request( struct sip_msg *rq) t = gmtime(&acc_env.ts); } if(strftime(acc_time_format_buf, ACC_TIME_FORMAT_SIZE, - acc_time_format, t)<0) { + acc_time_format, t)<=0) { acc_time_format_buf[0] = '\0'; } VAL_STRING(db_vals+(m++)) = acc_time_format_buf;
11 years
1
0
0
0
git:master: ctl: removed not needed extra paranthesis
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: efda774f6391f1e909a9967898c64fb25f53eeba URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=efda774…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri Dec 6 18:20:16 2013 +0100 ctl: removed not needed extra paranthesis --- modules/ctl/fifo_server.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/ctl/fifo_server.c b/modules/ctl/fifo_server.c index c72dcbe..d5f849f 100644 --- a/modules/ctl/fifo_server.c +++ b/modules/ctl/fifo_server.c @@ -757,7 +757,7 @@ process: ERR("File separator missing\n"); goto consume; } - if ((file_sep == context.method)) { + if (file_sep == context.method) { ERR("Empty command\n"); goto consume; }
11 years
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
32
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
Results per page:
10
25
50
100
200