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
November 2016
----- 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
27 participants
289 discussions
Start a n
N
ew thread
git:master:5a0e1c96: permissions: safety check of src len before copying to dst buffer
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 5a0e1c96bb7b315d9f9be05db402e63390e2eaaf URL:
https://github.com/kamailio/kamailio/commit/5a0e1c96bb7b315d9f9be05db402e63…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-06T17:08:00+01:00 permissions: safety check of src len before copying to dst buffer --- Modified: modules/permissions/parse_config.c Modified: modules/permissions/rule.c --- Diff:
https://github.com/kamailio/kamailio/commit/5a0e1c96bb7b315d9f9be05db402e63…
Patch:
https://github.com/kamailio/kamailio/commit/5a0e1c96bb7b315d9f9be05db402e63…
--- diff --git a/modules/permissions/parse_config.c b/modules/permissions/parse_config.c index a96ed30..df33123 100644 --- a/modules/permissions/parse_config.c +++ b/modules/permissions/parse_config.c @@ -102,18 +102,23 @@ static int parse_expression_list(char *str, expression **e) * return 0 on success, -1 on error * parsed expressions are returned in **e, and exceptions are returned in **e_exceptions */ -static int parse_expression(char *str, expression **e, expression **e_exceptions) +static int parse_expression(char *sv, expression **e, expression **e_exceptions) { char *except, str2[LINE_LENGTH+1]; int i,j; - if (!str || !e || !e_exceptions) return -1; + if (!sv || !e || !e_exceptions) return -1; - except = strstr(str, " EXCEPT "); + if(strlen(sv)>=LINE_LENGTH) { + LM_ERR("expression string is too long (%s)\n", sv); + return -1; + } + + except = strstr(sv, " EXCEPT "); if (except) { /* exception found */ - strncpy(str2, str, except-str); - str2[except-str] = '\0'; + strncpy(str2, sv, except-sv); + str2[except-sv] = '\0'; /* except+8 points to the exception */ if (parse_expression_list(except+8, e_exceptions)) { /* error */ @@ -122,7 +127,7 @@ static int parse_expression(char *str, expression **e, expression **e_exceptions } } else { /* no exception */ - strcpy(str2, str); + strcpy(str2, sv); *e_exceptions = NULL; } diff --git a/modules/permissions/rule.c b/modules/permissions/rule.c index 093911a..cd38a30 100644 --- a/modules/permissions/rule.c +++ b/modules/permissions/rule.c @@ -116,11 +116,16 @@ int search_rule(rule *r, char *left, char *right) * allocate memory for a new expression * str is saved in vale, and compiled to POSIX regexp (reg_value) */ -expression *new_expression(char *str) +expression *new_expression(char *sv) { expression *e; - if (!str) return 0; + if (!sv) return 0; + + if(strlen(sv)>=EXPRESSION_LENGTH) { + LM_ERR("expression string is too large (%s)\n", sv); + return 0; + } e = (expression *)pkg_malloc(sizeof(expression)); if (!e) { @@ -128,7 +133,7 @@ expression *new_expression(char *str) return 0; } - strcpy(e->value, str); + strcpy(e->value, sv); e->reg_value = (regex_t*)pkg_malloc(sizeof(regex_t)); if (!e->reg_value) { @@ -137,8 +142,8 @@ expression *new_expression(char *str) return 0; } - if (regcomp(e->reg_value, str, REG_EXTENDED|REG_NOSUB|REG_ICASE) ) { - LM_ERR("bad regular expression: %s\n", str); + if (regcomp(e->reg_value, sv, REG_EXTENDED|REG_NOSUB|REG_ICASE) ) { + LM_ERR("bad regular expression: %s\n", sv); pkg_free(e->reg_value); pkg_free(e); return NULL;
8 years, 1 month
1
0
0
0
git:master:dc84c0aa: dmq_usrloc: init vars earlier to avoid invalid value cleanup on error handling
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: dc84c0aaa66573d86633dd12bc42c55961831a76 URL:
https://github.com/kamailio/kamailio/commit/dc84c0aaa66573d86633dd12bc42c55…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-05T13:33:36+01:00 dmq_usrloc: init vars earlier to avoid invalid value cleanup on error handling --- Modified: modules/dmq_usrloc/usrloc_sync.c --- Diff:
https://github.com/kamailio/kamailio/commit/dc84c0aaa66573d86633dd12bc42c55…
Patch:
https://github.com/kamailio/kamailio/commit/dc84c0aaa66573d86633dd12bc42c55…
--- diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c index f7fac21..31526d2 100644 --- a/modules/dmq_usrloc/usrloc_sync.c +++ b/modules/dmq_usrloc/usrloc_sync.c @@ -321,16 +321,25 @@ int usrloc_dmq_handle_msg(struct sip_msg* msg, peer_reponse_t* resp, dmq_node_t* unsigned int action, expires, cseq, flags, cflags, q, last_modified, methods, reg_id; - str aor, ruid, c, received, path, callid, user_agent, instance; + str aor=STR_NULL, ruid=STR_NULL, c=STR_NULL, received=STR_NULL, + path=STR_NULL, callid=STR_NULL, user_agent=STR_NULL, instance=STR_NULL; action = expires = cseq = flags = cflags = q = last_modified = methods = reg_id = 0; - parse_from_header(msg); + srjson_InitDoc(&jdoc, NULL); + if(parse_from_header(msg)<0) { + LM_ERR("failed to parse from header\n"); + goto invalid; + } body = ((struct to_body*)msg->from->parsed)->uri; LM_DBG("dmq message received from %.*s\n", body.len, body.s); + if(parse_headers(msg, HDR_EOH_F, 0)<0) { + LM_ERR("failed to parse the headers\n"); + goto invalid; + } if(!msg->content_length) { LM_ERR("no content length header found\n"); goto invalid; @@ -349,7 +358,6 @@ int usrloc_dmq_handle_msg(struct sip_msg* msg, peer_reponse_t* resp, dmq_node_t* goto error; } - srjson_InitDoc(&jdoc, NULL); jdoc.buf = body; if(jdoc.root == NULL) { jdoc.root = srjson_Parse(&jdoc, jdoc.buf.s);
8 years, 1 month
1
0
0
0
git:master:9a152cbd: usrloc: handle return code when registering the timer routine
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 9a152cbd15a84191418ecd3bbb56dff48438bfd1 URL:
https://github.com/kamailio/kamailio/commit/9a152cbd15a84191418ecd3bbb56dff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-05T13:33:36+01:00 usrloc: handle return code when registering the timer routine --- Modified: modules/usrloc/ul_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/9a152cbd15a84191418ecd3bbb56dff…
Patch:
https://github.com/kamailio/kamailio/commit/9a152cbd15a84191418ecd3bbb56dff…
--- diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c index c111ea7..958c966 100644 --- a/modules/usrloc/ul_mod.c +++ b/modules/usrloc/ul_mod.c @@ -358,7 +358,10 @@ static int mod_init(void) } if(db_mode==WRITE_THROUGH || db_mode==WRITE_BACK) { if(ul_db_timer_clean!=0) { - sr_wtimer_add(ul_db_clean_timer, 0, timer_interval); + if(sr_wtimer_add(ul_db_clean_timer, 0, timer_interval)<0) { + LM_ERR("failed to add db clean timer routine\n"); + return -1; + } } }
8 years, 1 month
1
0
0
0
git:master:19786d85: Merge pull request #849 from winem/master
by GitHub
Module: kamailio Branch: master Commit: 19786d85138a3d6a9966d9449387ae77f04e3c27 URL:
https://github.com/kamailio/kamailio/commit/19786d85138a3d6a9966d9449387ae7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: GitHub <noreply(a)github.com> Date: 2016-11-04T17:50:16+01:00 Merge pull request #849 from winem/master Updated the specs file for CentOS 7 --- Added: pkg/kamailio/centos/7/README Added: pkg/kamailio/centos/7/kamailio.init Added: pkg/kamailio/centos/7/kamailio.spec Added: pkg/kamailio/centos/7/kamailio.sysconfig --- Diff:
https://github.com/kamailio/kamailio/commit/19786d85138a3d6a9966d9449387ae7…
Patch:
https://github.com/kamailio/kamailio/commit/19786d85138a3d6a9966d9449387ae7…
8 years, 1 month
1
0
0
0
git:master:045fa78f: specs file to build rpm packages for centos 7
by Marcel Weinberg
Module: kamailio Branch: master Commit: 045fa78f7df5bd8e1ddd744e54b45ead87ae81a3 URL:
https://github.com/kamailio/kamailio/commit/045fa78f7df5bd8e1ddd744e54b45ea…
Author: Marcel Weinberg <marcel(a)ng-voice.com> Committer: Marcel Weinberg <marcel(a)ng-voice.com> Date: 2016-11-04T17:25:53+01:00 specs file to build rpm packages for centos 7 --- Added: pkg/kamailio/centos/7/README Added: pkg/kamailio/centos/7/kamailio.init Added: pkg/kamailio/centos/7/kamailio.spec Added: pkg/kamailio/centos/7/kamailio.sysconfig --- Diff:
https://github.com/kamailio/kamailio/commit/045fa78f7df5bd8e1ddd744e54b45ea…
Patch:
https://github.com/kamailio/kamailio/commit/045fa78f7df5bd8e1ddd744e54b45ea…
8 years, 1 month
1
0
0
0
[kamailio/kamailio] Updated the specs file for CentOS 7 (#849)
by Marcel
I updated the specs file (see the changelog) to build Kamailio 5.x rpm packages for CentOS 7.2 You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/849
-- Commit Summary -- * specs file to build rpm packages for centos 7 -- File Changes -- A pkg/kamailio/centos/7/README (16) A pkg/kamailio/centos/7/kamailio.init (134) A pkg/kamailio/centos/7/kamailio.spec (1348) A pkg/kamailio/centos/7/kamailio.sysconfig (30) -- Patch Links --
https://github.com/kamailio/kamailio/pull/849.patch
https://github.com/kamailio/kamailio/pull/849.diff
-- 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/pull/849
8 years, 1 month
2
2
0
0
git:master:d8e9cc44: tm: updated log format from old style with function names in message
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d8e9cc44ffe5f3191c115b23323b640c66416e9f URL:
https://github.com/kamailio/kamailio/commit/d8e9cc44ffe5f3191c115b23323b640…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-04T12:31:01+01:00 tm: updated log format from old style with function names in message --- Modified: modules/tm/t_fwd.c --- Diff:
https://github.com/kamailio/kamailio/commit/d8e9cc44ffe5f3191c115b23323b640…
Patch:
https://github.com/kamailio/kamailio/commit/d8e9cc44ffe5f3191c115b23323b640…
8 years, 1 month
1
0
0
0
git:master:2b7c11ff: tm: coherent indentation and whitespacing for t_fwd
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 2b7c11ff514242dc8fc5c929ae2e02211fb9cc5b URL:
https://github.com/kamailio/kamailio/commit/2b7c11ff514242dc8fc5c929ae2e022…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-04T12:11:39+01:00 tm: coherent indentation and whitespacing for t_fwd --- Modified: modules/tm/t_fwd.c --- Diff:
https://github.com/kamailio/kamailio/commit/2b7c11ff514242dc8fc5c929ae2e022…
Patch:
https://github.com/kamailio/kamailio/commit/2b7c11ff514242dc8fc5c929ae2e022…
8 years, 1 month
1
0
0
0
git:master:705969d4: tmx: warning message if updates to destination attributes fail
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 705969d40d5e0326f6b0ccf055e5ada7229f720b URL:
https://github.com/kamailio/kamailio/commit/705969d40d5e0326f6b0ccf055e5ada…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-04T11:58:20+01:00 tmx: warning message if updates to destination attributes fail --- Modified: modules/tmx/tmx_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/705969d40d5e0326f6b0ccf055e5ada…
Patch:
https://github.com/kamailio/kamailio/commit/705969d40d5e0326f6b0ccf055e5ada…
--- diff --git a/modules/tmx/tmx_mod.c b/modules/tmx/tmx_mod.c index e3e7b7d..07b1f00 100644 --- a/modules/tmx/tmx_mod.c +++ b/modules/tmx/tmx_mod.c @@ -729,10 +729,14 @@ static int w_t_reuse_branch(struct sip_msg* msg, char *p1, char *p2) " in MODE_ONFAILURE\n", branch); return -1; } - rewrite_uri(msg, &(t->uac[branch].uri)); + if(rewrite_uri(msg, &(t->uac[branch].uri))<0) { + LM_WARN("failed to rewrite the r-uri\n"); + } set_ruid(msg, &(t->uac[branch].ruid)); if (t->uac[branch].path.len) { - set_path_vector(msg, &(t->uac[branch].path)); + if(set_path_vector(msg, &(t->uac[branch].path))<0) { + LM_WARN("failed to set the path vector\n"); + } } else { reset_path_vector(msg); }
8 years, 1 month
1
0
0
0
git:master:9f9e3162: tm: print warn messages when failing to update r-uri and path
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 9f9e3162cd92b564323c9e77689f57c9dd0600bc URL:
https://github.com/kamailio/kamailio/commit/9f9e3162cd92b564323c9e77689f57c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-11-04T11:57:55+01:00 tm: print warn messages when failing to update r-uri and path --- Modified: modules/tm/t_fwd.c Modified: modules/tm/t_serial.c --- Diff:
https://github.com/kamailio/kamailio/commit/9f9e3162cd92b564323c9e77689f57c…
Patch:
https://github.com/kamailio/kamailio/commit/9f9e3162cd92b564323c9e77689f57c…
--- diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c index 1586ec3..f60d5ee 100644 --- a/modules/tm/t_fwd.c +++ b/modules/tm/t_fwd.c @@ -1013,7 +1013,7 @@ int add_uac_dns_fallback(struct cell *t, struct sip_msg* msg, "branches exceeded\n"); if (lock_replies) UNLOCK_REPLIES(t); - ret=ser_error=E_TOO_MANY_BRANCHES; + ret=ser_error=E_TOO_MANY_BRANCHES; return ret; } /* copy the dns handle into the new uac */ diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c index 2fb734f..85d0247 100644 --- a/modules/tm/t_serial.c +++ b/modules/tm/t_serial.c @@ -548,7 +548,9 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) } /* Rewrite Request-URI */ - rewrite_uri(msg, &uri); + if(rewrite_uri(msg, &uri)<0) { + LM_WARN("failed to rewrite r-uri\n"); + } if (dst_uri.len) { set_dst_uri(msg, &dst_uri); @@ -557,7 +559,9 @@ int t_next_contacts(struct sip_msg* msg, char* key, char* value) } if (path.len) { - set_path_vector(msg, &path); + if(set_path_vector(msg, &path)<0) { + LM_WARN("failed to set path vector\n"); + } } else { reset_path_vector(msg); }
8 years, 1 month
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
29
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
Results per page:
10
25
50
100
200