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
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
May 2015
----- 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
34 participants
297 discussions
Start a n
N
ew thread
git:master:646bcf91: db_text: fixed leak for raw query where bulding
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 646bcf919e5c33dac21985254a0065d41a03f62d URL:
https://github.com/kamailio/kamailio/commit/646bcf919e5c33dac21985254a0065d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T13:19:58+02:00 db_text: fixed leak for raw query where bulding --- Modified: modules/db_text/dbt_raw_util.c --- Diff:
https://github.com/kamailio/kamailio/commit/646bcf919e5c33dac21985254a0065d…
Patch:
https://github.com/kamailio/kamailio/commit/646bcf919e5c33dac21985254a0065d…
--- diff --git a/modules/db_text/dbt_raw_util.c b/modules/db_text/dbt_raw_util.c index 58f55cf..708a6bc 100644 --- a/modules/db_text/dbt_raw_util.c +++ b/modules/db_text/dbt_raw_util.c @@ -165,15 +165,18 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** _o, db_val_t** _v) db_key_t* _k1 = NULL; char** _o1 = NULL; db_val_t* _v1 = NULL; + regmatch_t* matches = NULL; + int n, l; + int len; + regex_t preg; + int offset = 0; + int idx = -1; *_k = NULL; *_o = NULL; *_v = NULL; - int n, l; - int len = strlen(where); - - regex_t preg; + len = strlen(where); if (regcomp(&preg, _regexp, REG_EXTENDED | REG_NEWLINE)) { LM_ERR("error compiling regexp\n"); @@ -187,10 +190,12 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** _o, db_val_t** _v) _v1 = pkg_malloc(sizeof(db_val_t) * MAX_CLAUSES); memset(_v1, 0, sizeof(db_val_t) * MAX_CLAUSES); - regmatch_t* matches = (regmatch_t*)pkg_malloc(sizeof(regmatch_t) * MAX_MATCH); + matches = (regmatch_t*)pkg_malloc(sizeof(regmatch_t) * MAX_MATCH); + if(matches==NULL) { + LM_ERR("error getting pkg memory\n"); + return -1; + } - int offset = 0; - int idx = -1; while(offset < len) { char* buffer = where + offset; @@ -238,6 +243,7 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** _o, db_val_t** _v) } regfree(&preg); + pkg_free(matches); *_k = _k1; *_o = (db_op_t*)_o1;
9 years, 6 months
1
0
0
0
git:master:1b20aa04: pua: mark that tupple was allocated so can be freed in case of errors
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 1b20aa04048d15d0861b3f5291fd3b9a1614fdf5 URL:
https://github.com/kamailio/kamailio/commit/1b20aa04048d15d0861b3f5291fd3b9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T13:09:47+02:00 pua: mark that tupple was allocated so can be freed in case of errors --- Modified: modules/pua/add_events.c --- Diff:
https://github.com/kamailio/kamailio/commit/1b20aa04048d15d0861b3f5291fd3b9…
Patch:
https://github.com/kamailio/kamailio/commit/1b20aa04048d15d0861b3f5291fd3b9…
--- diff --git a/modules/pua/add_events.c b/modules/pua/add_events.c index 5446745..f4a9c8e 100644 --- a/modules/pua/add_events.c +++ b/modules/pua/add_events.c @@ -194,6 +194,7 @@ int pres_process_body(publ_info_t* publ, str** fin_body, int ver, str** tuple_pa LM_ERR("No more memory\n"); goto error; } + alloc_tuple= 1; tuple->s= (char*)pkg_malloc(tuple_id_len* sizeof(char)); if(tuple->s== NULL) { @@ -203,7 +204,6 @@ int pres_process_body(publ_info_t* publ, str** fin_body, int ver, str** tuple_pa memcpy(tuple->s, tuple_id, tuple_id_len); tuple->len= tuple_id_len; *tuple_param= tuple; - alloc_tuple= 1; } }
9 years, 6 months
1
0
0
0
git:master:29d7ca71: imc: better condition to catch no result of database query
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 29d7ca71fdfc8c52fb5e68fcf3bccf98dde0d089 URL:
https://github.com/kamailio/kamailio/commit/29d7ca71fdfc8c52fb5e68fcf3bccf9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T12:54:18+02:00 imc: better condition to catch no result of database query --- Modified: modules/imc/imc.c --- Diff:
https://github.com/kamailio/kamailio/commit/29d7ca71fdfc8c52fb5e68fcf3bccf9…
Patch:
https://github.com/kamailio/kamailio/commit/29d7ca71fdfc8c52fb5e68fcf3bccf9…
--- diff --git a/modules/imc/imc.c b/modules/imc/imc.c index f54b2be..8fbfd14 100644 --- a/modules/imc/imc.c +++ b/modules/imc/imc.c @@ -200,10 +200,10 @@ int add_from_db(void) LM_ERR("failed to querry table\n"); return -1; } - if(r_res && r_res->n<=0) + if(r_res==NULL || r_res->n<=0) { LM_INFO("the query returned no result\n"); - imc_dbf.free_result(imc_db, r_res); + if(r_res) imc_dbf.free_result(imc_db, r_res); r_res = NULL; return 0; }
9 years, 6 months
1
0
0
0
git:master:379667e8: regex: reset pointer after free to avoid double free if an error occurs
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 379667e878c9e0795998f600edbcbb3974846f71 URL:
https://github.com/kamailio/kamailio/commit/379667e878c9e0795998f600edbcbb3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T13:01:18+02:00 regex: reset pointer after free to avoid double free if an error occurs --- Modified: modules/regex/regex_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/379667e878c9e0795998f600edbcbb3…
Patch:
https://github.com/kamailio/kamailio/commit/379667e878c9e0795998f600edbcbb3…
--- diff --git a/modules/regex/regex_mod.c b/modules/regex/regex_mod.c index 35eeca0..394a9e7 100644 --- a/modules/regex/regex_mod.c +++ b/modules/regex/regex_mod.c @@ -411,6 +411,7 @@ static int load_pcres(int action) memcpy(pcres_tmp[i], pcre_tmp, pcre_size); pcre_free(pcre_tmp); pkg_free(patterns[i]); + patterns[i] = NULL; } /* Copy to shared memory */
9 years, 6 months
1
0
0
0
git:master:c24329ed: presence: initialize result to avoid freeing garbage in case of other errors
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: c24329ed483ea3abd720af73411a2331acc947e4 URL:
https://github.com/kamailio/kamailio/commit/c24329ed483ea3abd720af73411a233…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T12:28:29+02:00 presence: initialize result to avoid freeing garbage in case of other errors --- Modified: modules/presence/notify.c --- Diff:
https://github.com/kamailio/kamailio/commit/c24329ed483ea3abd720af73411a233…
Patch:
https://github.com/kamailio/kamailio/commit/c24329ed483ea3abd720af73411a233…
--- diff --git a/modules/presence/notify.c b/modules/presence/notify.c index 5cd6167..6466fc1 100644 --- a/modules/presence/notify.c +++ b/modules/presence/notify.c @@ -2355,7 +2355,7 @@ static watcher_t *build_watchers_list(subs_t *sub) db_key_t query_cols[3], result_cols[4]; db_val_t query_vals[3], *values; db_row_t *rows; - db1_res_t *result; + db1_res_t *result = NULL; int n_query_cols = 0, n_result_cols = 0; int wuser_col, wdomain_col, callid_col, status_col; int i;
9 years, 6 months
1
0
0
0
git:master:bd189f42: mi_datagram: init structure before conditions to jump to err label
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: bd189f4239403b4b673f3d5b0ce3b6e5c7f4bacc URL:
https://github.com/kamailio/kamailio/commit/bd189f4239403b4b673f3d5b0ce3b6e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T12:25:33+02:00 mi_datagram: init structure before conditions to jump to err label - garbage condition would have been made in err case --- Modified: modules/mi_datagram/datagram_fnc.c --- Diff:
https://github.com/kamailio/kamailio/commit/bd189f4239403b4b673f3d5b0ce3b6e…
Patch:
https://github.com/kamailio/kamailio/commit/bd189f4239403b4b673f3d5b0ce3b6e…
--- diff --git a/modules/mi_datagram/datagram_fnc.c b/modules/mi_datagram/datagram_fnc.c index 8470ddb..0309b73 100644 --- a/modules/mi_datagram/datagram_fnc.c +++ b/modules/mi_datagram/datagram_fnc.c @@ -331,9 +331,9 @@ static void datagram_close_async(struct mi_root *mi_rpl,struct mi_handler *hdl, LM_DBG("the socket domain is %i and af_local is %i\n", p->domain, AF_LOCAL); - mi_create_dtgram_replysocket(reply_sock, p->domain, err); + memset(&dtgram, 0, sizeof(dtgram)); - memset(&dtgram, 0, sizeof(dtgram)); + mi_create_dtgram_replysocket(reply_sock, p->domain, err); if (mi_rpl!=0) { /*allocate the response datagram*/
9 years, 6 months
1
0
0
0
git:master:c5ef9569: presence: initialize variable to avoid compile warning
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: c5ef9569d524ab49d538e85a905520b72e1d8dea URL:
https://github.com/kamailio/kamailio/commit/c5ef9569d524ab49d538e85a905520b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T12:03:28+02:00 presence: initialize variable to avoid compile warning --- Modified: modules/presence/subscribe.c --- Diff:
https://github.com/kamailio/kamailio/commit/c5ef9569d524ab49d538e85a905520b…
Patch:
https://github.com/kamailio/kamailio/commit/c5ef9569d524ab49d538e85a905520b…
--- diff --git a/modules/presence/subscribe.c b/modules/presence/subscribe.c index 84f16e5..1268243 100644 --- a/modules/presence/subscribe.c +++ b/modules/presence/subscribe.c @@ -842,7 +842,7 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain) pres_ev_t* event= NULL; event_t* parsed_event= NULL; param_t* ev_param= NULL; - int found; + int found = 0; str reason= {0, 0}; struct sip_uri uri; int reply_code; @@ -1040,7 +1040,7 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain) goto error; } LM_DBG("subscription status= %s - %s\n", get_status_str(subs.status), - found==0?"inserted":"found in watcher table"); + (found==0)?"inserted":"found in watcher table"); if (pres_notifier_processes > 0) {
9 years, 6 months
1
0
0
0
git:master:23b476ed: core: init vars for socket ttl helper function to avoid warnings
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 23b476ed7c7b48ddd7cacf3d88e9c104db06d5dc URL:
https://github.com/kamailio/kamailio/commit/23b476ed7c7b48ddd7cacf3d88e9c10…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T10:25:47+02:00 core: init vars for socket ttl helper function to avoid warnings --- Modified: sock_ut.c --- Diff:
https://github.com/kamailio/kamailio/commit/23b476ed7c7b48ddd7cacf3d88e9c10…
Patch:
https://github.com/kamailio/kamailio/commit/23b476ed7c7b48ddd7cacf3d88e9c10…
--- diff --git a/sock_ut.c b/sock_ut.c index 69764c5..b1da20d 100644 --- a/sock_ut.c +++ b/sock_ut.c @@ -35,8 +35,8 @@ */ int sock_get_ttl(int sock) { - int ioptval; - unsigned int ioptvallen; + int ioptval = 0; + unsigned int ioptvallen = 0; ioptvallen=sizeof(ioptval); if (getsockopt( sock, IPPROTO_IP, IP_TTL, (void*) &ioptval, @@ -54,7 +54,7 @@ int sock_get_ttl(int sock) */ int sock_set_ttl(int sock, int ttl) { - int ioptval; + int ioptval = 0; if (setsockopt( sock, IPPROTO_IP, IP_TTL, (void*) &ioptval, sizeof(ioptval)) == -1 )
9 years, 6 months
1
0
0
0
git:master:f93d3c70: dispatcher: init socket pointer to null
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f93d3c70b1b14665ddc11ca2c39e1d114390e5f9 URL:
https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T10:17:56+02:00 dispatcher: init socket pointer to null - covers all situations, also when the afferent avp name is not set --- Modified: modules/dispatcher/dispatch.c --- Diff:
https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d1…
Patch:
https://github.com/kamailio/kamailio/commit/f93d3c70b1b14665ddc11ca2c39e1d1…
--- diff --git a/modules/dispatcher/dispatch.c b/modules/dispatcher/dispatch.c index 1a0b41a..7491a5f 100644 --- a/modules/dispatcher/dispatch.c +++ b/modules/dispatcher/dispatch.c @@ -2055,7 +2055,7 @@ int ds_next_dst(struct sip_msg *msg, int mode) struct search_state st; struct usr_avp *avp; struct usr_avp *prev_avp; - struct socket_info *sock; + struct socket_info *sock = NULL; int_str avp_value; int_str sock_avp_value; int alg = 0; @@ -2098,8 +2098,6 @@ int ds_next_dst(struct sip_msg *msg, int mode) if (sscanf( sock_avp_value.s.s, "%p", (void**)&sock ) != 1) sock = NULL; destroy_avp(prev_avp); - } else { - sock = NULL; } }
9 years, 6 months
1
0
0
0
git:master:80977adc: pua: safety checks for str pointers
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 80977adc1bd70479c1e32d867563e4e684060b25 URL:
https://github.com/kamailio/kamailio/commit/80977adc1bd70479c1e32d867563e4e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-05-14T10:04:26+02:00 pua: safety checks for str pointers --- Modified: modules/pua/send_subscribe.c --- Diff:
https://github.com/kamailio/kamailio/commit/80977adc1bd70479c1e32d867563e4e…
Patch:
https://github.com/kamailio/kamailio/commit/80977adc1bd70479c1e32d867563e4e…
--- diff --git a/modules/pua/send_subscribe.c b/modules/pua/send_subscribe.c index 48acbd5..84b69f8 100644 --- a/modules/pua/send_subscribe.c +++ b/modules/pua/send_subscribe.c @@ -887,7 +887,7 @@ ua_pres_t* subs_cbparam_indlg(ua_pres_t* subs, int expires, int ua_flag) CONT_COPY(hentity, hentity->contact, subs->contact) - if(subs->outbound_proxy) + if(subs->outbound_proxy && subs->outbound_proxy->len && subs->outbound_proxy->s) { hentity->outbound_proxy= (str*)((char*)hentity+ size); size+= sizeof(str); @@ -907,7 +907,7 @@ ua_pres_t* subs_cbparam_indlg(ua_pres_t* subs, int expires, int ua_flag) CONT_COPY(hentity, hentity->remote_contact, subs->remote_contact) } - if(subs->extra_headers) + if(subs->extra_headers && subs->extra_headers->s) { hentity->extra_headers= (str*)((char*)hentity+ size); size+= sizeof(str);
9 years, 6 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
30
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
Results per page:
10
25
50
100
200