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
January 2018
----- 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
35 participants
368 discussions
Start a n
N
ew thread
git:5.1:cb5d201b: erlang: fix never used value assigned to a variable
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: cb5d201bf313955305e66c976bf77d87c7295ba9 URL:
https://github.com/kamailio/kamailio/commit/cb5d201bf313955305e66c976bf77d8…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:24:34+01:00 erlang: fix never used value assigned to a variable (cherry picked from commit 6542a367638ec5f8a2b62994f8c309e7a2533962) --- Modified: src/modules/erlang/pv_xbuff.c --- Diff:
https://github.com/kamailio/kamailio/commit/cb5d201bf313955305e66c976bf77d8…
Patch:
https://github.com/kamailio/kamailio/commit/cb5d201bf313955305e66c976bf77d8…
--- diff --git a/src/modules/erlang/pv_xbuff.c b/src/modules/erlang/pv_xbuff.c index 1682e52f3b..ce6e2bd2eb 100644 --- a/src/modules/erlang/pv_xbuff.c +++ b/src/modules/erlang/pv_xbuff.c @@ -87,10 +87,10 @@ sr_xavp_t *xbuff_new(str *name) if(!xbuffs_root) { xbuff = xavp_add_xavp_value(&xbuff_list,name,&xbuff_val,xavp_get_crt_list()); + } else { + xbuff = xavp_get_child(&xbuff_list, name); } - xbuff=xavp_get_child(&xbuff_list, name); - if (!xbuff) { xbuff_val.type = SR_XTYPE_NULL;
6 years, 10 months
1
0
0
0
git:5.1:f85f1033: erlang: fix unreachable code
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: f85f1033c5a30bc1b62758358da74254140de9f4 URL:
https://github.com/kamailio/kamailio/commit/f85f1033c5a30bc1b62758358da7425…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:24:27+01:00 erlang: fix unreachable code (cherry picked from commit c061d6688c505544aecfc39a43e8c60d48875790) --- Modified: src/modules/erlang/handle_rpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/f85f1033c5a30bc1b62758358da7425…
Patch:
https://github.com/kamailio/kamailio/commit/f85f1033c5a30bc1b62758358da7425…
--- diff --git a/src/modules/erlang/handle_rpc.c b/src/modules/erlang/handle_rpc.c index fccec06680..5fe3c1f978 100644 --- a/src/modules/erlang/handle_rpc.c +++ b/src/modules/erlang/handle_rpc.c @@ -1418,15 +1418,13 @@ static int find_member(erl_rpc_ctx_t *ctx, int arity, const char* member_name) erl_rpc_fault(ctx,400,"Unexpected end of struct tuple"); goto error; } - continue; + i++; } else { /* return at current position */ return 0; } - - i++; } erl_rpc_fault(ctx,400, "Member %s not found",member_name);
6 years, 10 months
1
0
0
0
git:5.1:b8558289: erlang: improve error handling
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: b8558289d363ac7591a63be136f013171542a655 URL:
https://github.com/kamailio/kamailio/commit/b8558289d363ac7591a63be136f0131…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:23:51+01:00 erlang: improve error handling Ensure check value returned from function and log error. (cherry picked from commit b43609dec2c4089e02b11fd23099ab01b2ebc956) --- Modified: src/modules/erlang/handle_emsg.c Modified: src/modules/erlang/pv_xbuff.c Modified: src/modules/erlang/worker.c --- Diff:
https://github.com/kamailio/kamailio/commit/b8558289d363ac7591a63be136f0131…
Patch:
https://github.com/kamailio/kamailio/commit/b8558289d363ac7591a63be136f0131…
--- diff --git a/src/modules/erlang/handle_emsg.c b/src/modules/erlang/handle_emsg.c index 1e36be5cb6..96de5e01d8 100644 --- a/src/modules/erlang/handle_emsg.c +++ b/src/modules/erlang/handle_emsg.c @@ -437,7 +437,11 @@ int erlang_whereis(cnode_handler_t *phandler,erlang_ref_ex_t *ref, erlang_pid *p return 0; } - ei_decode_atom(request->buff,&request->index,route+sizeof("erlang:")-1); + if(ei_decode_atom(request->buff,&request->index,route+sizeof("erlang:")-1)) { + LM_ERR("error: badarg\n"); + ei_x_encode_atom(response,"badarg"); + return 0; + } rt = route_get(&event_rt, route); if (rt < 0 || event_rt.rlist[rt] == NULL) { @@ -820,7 +824,9 @@ int handle_erlang_msg(cnode_handler_t *phandler, erlang_msg * msg) ret = handle_req_ref_tuple(phandler, msg); break; case ERL_PID_EXT: - ei_decode_pid(request->buff,&tmpindex,&from); + if(ei_decode_pid(request->buff,&tmpindex,&from)) { + LM_ERR("failed to decode pid\n"); + } ret = handle_send(phandler, msg); break; default: diff --git a/src/modules/erlang/pv_xbuff.c b/src/modules/erlang/pv_xbuff.c index e8d26cdb9a..1682e52f3b 100644 --- a/src/modules/erlang/pv_xbuff.c +++ b/src/modules/erlang/pv_xbuff.c @@ -988,7 +988,10 @@ int xavp_decode(ei_x_buff *xbuff, int *index, sr_xavp_t **xavp,int level) return -1; } - ei_decode_atom(xbuff->buff,index,pbuf); + if (ei_decode_atom(xbuff->buff,index,pbuf)) { + LM_ERR("failed to decode atom\n"); + goto err; + } val.type = SR_XTYPE_STR; val.v.s.s = pbuf; diff --git a/src/modules/erlang/worker.c b/src/modules/erlang/worker.c index 2a02e51df6..71af3b0298 100644 --- a/src/modules/erlang/worker.c +++ b/src/modules/erlang/worker.c @@ -59,7 +59,10 @@ int handle_worker(handler_common_t *phandler) int rc; /* ensure be connected */ - enode_connect(); + if (enode_connect()){ + LM_ERR("failed to connect!\n"); + return -1; + } memset((void*)&msg,0,sizeof(msg));
6 years, 10 months
1
0
0
0
git:5.1:1bf7918a: erlang: fix bad free
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: 1bf7918a01bd0e7528a7706421935d10bd11198d URL:
https://github.com/kamailio/kamailio/commit/1bf7918a01bd0e7528a7706421935d1…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:23:39+01:00 erlang: fix bad free Avoid to free non-pointer, likely causing a crash later. (cherry picked from commit 3680a1a6ec6971e79deb76daafc89cf2fe206c60) --- Modified: src/modules/erlang/erlang_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/1bf7918a01bd0e7528a7706421935d1…
Patch:
https://github.com/kamailio/kamailio/commit/1bf7918a01bd0e7528a7706421935d1…
--- diff --git a/src/modules/erlang/erlang_mod.c b/src/modules/erlang/erlang_mod.c index 1c3c12efeb..54d2fa1733 100644 --- a/src/modules/erlang/erlang_mod.c +++ b/src/modules/erlang/erlang_mod.c @@ -697,7 +697,6 @@ static int fixup_rpc(void** param, int param_no) if (psp->setf != pv_list_set && psp->setf != pv_xbuff_set) { LM_ERR("wrong parameter #%d: accepted types are list or xbuff\n",param_no); - pv_spec_free(&erl_param->value.sp); pkg_free((void*)erl_param); return E_UNSPEC; } @@ -916,7 +915,6 @@ static int fixup_reg(void** param, int param_no) erl_param->type = ERL_PARAM_XBUFF_SPEC; } else { LM_ERR("wrong parameter #%d\n",param_no); - pv_spec_free(&erl_param->value.sp); pkg_free((void*)erl_param); return E_UNSPEC; } @@ -1111,7 +1109,6 @@ static int fixup_reply(void** param, int param_no) erl_param->type = ERL_PARAM_XBUFF_SPEC; } else { LM_ERR("wrong parameter #%d\n",param_no); - pv_spec_free(&erl_param->value.sp); pkg_free((void*)erl_param); return E_UNSPEC; } @@ -1376,7 +1373,6 @@ static int fixup_send(void** param, int param_no) erl_param->type = ERL_PARAM_XBUFF_SPEC; } else { LM_ERR("wrong parameter #%d\n",param_no); - pv_spec_free(&erl_param->value.sp); pkg_free((void*)erl_param); return E_UNSPEC; }
6 years, 10 months
1
0
0
0
git:5.1:4d8e0755: erlang: fix memory leaks
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: 4d8e0755ba8169e8d5655d5b571a02d6c8ac6afb URL:
https://github.com/kamailio/kamailio/commit/4d8e0755ba8169e8d5655d5b571a02d…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:23:30+01:00 erlang: fix memory leaks Ensure free used memory if parse of params failed. (cherry picked from commit 074eda76b3c2cb418832fd4b24436bf7f109b89e) --- Modified: src/modules/erlang/erlang_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/4d8e0755ba8169e8d5655d5b571a02d…
Patch:
https://github.com/kamailio/kamailio/commit/4d8e0755ba8169e8d5655d5b571a02d…
--- diff --git a/src/modules/erlang/erlang_mod.c b/src/modules/erlang/erlang_mod.c index 2753842967..1c3c12efeb 100644 --- a/src/modules/erlang/erlang_mod.c +++ b/src/modules/erlang/erlang_mod.c @@ -666,6 +666,7 @@ static int fixup_rpc(void** param, int param_no) if(param_no==1 || param_no==2) { if (fix_param_types(FPARAM_STR|FPARAM_STRING|FPARAM_AVP|FPARAM_PVS|FPARAM_PVE,param)){ LM_ERR("wrong parameter #%d\n",param_no); + pkg_free((void*)erl_param); return -1; } erl_param->type = ERL_PARAM_FPARAM; @@ -873,6 +874,7 @@ static int fixup_reg(void** param, int param_no) if(param_no==1) { if (fix_param_types(FPARAM_STR|FPARAM_STRING|FPARAM_AVP|FPARAM_PVS|FPARAM_PVE|FPARAM_INT,param)){ LM_ERR("wrong parameter #%d\n",param_no); + pkg_free((void*)erl_param); return -1; } erl_param->type = ERL_PARAM_FPARAM;
6 years, 10 months
1
0
0
0
git:5.1:a262553c: erlang: fix use of an uninitialized variable
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: a262553c9fe89f1543c9bf4275da3f9b07efada5 URL:
https://github.com/kamailio/kamailio/commit/a262553c9fe89f1543c9bf4275da3f9…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:23:21+01:00 erlang: fix use of an uninitialized variable Ensure to initialize variable before use. (cherry picked from commit a379ef730bc129b630325672c9a39aa8c59139b9) --- Modified: src/modules/erlang/erl_helpers.c Modified: src/modules/erlang/handle_emsg.c Modified: src/modules/erlang/handle_rpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/a262553c9fe89f1543c9bf4275da3f9…
Patch:
https://github.com/kamailio/kamailio/commit/a262553c9fe89f1543c9bf4275da3f9…
--- diff --git a/src/modules/erlang/erl_helpers.c b/src/modules/erlang/erl_helpers.c index ddc0abc952..8c7a391830 100644 --- a/src/modules/erlang/erl_helpers.c +++ b/src/modules/erlang/erl_helpers.c @@ -73,7 +73,6 @@ int erl_passive_socket(const char *hostname, int qlen, int port; struct addrinfo *ai; struct addrinfo hints; - struct ip_addr ip; socklen_t addrlen = sizeof(struct sockaddr); memset(&hints, 0, sizeof(struct addrinfo)); @@ -103,8 +102,7 @@ int erl_passive_socket(const char *hostname, int qlen, /* initialize TCP */ #if !defined(TCP_DONT_REUSEADDR) if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int))) { - LM_ERR("failed to enable SO_REUSEADDR for socket on %s %s, %s\n", - hostname, ip_addr2strz(&ip), strerror(errno)); + LM_ERR("failed to enable SO_REUSEADDR: %s\n", strerror(errno)); } #endif /* tos */ @@ -118,8 +116,8 @@ int erl_passive_socket(const char *hostname, int qlen, if (bind(sockfd, ai->ai_addr, ai->ai_addrlen) < 0) { port=sockaddr_port(ai->ai_addr); - LM_CRIT("failed to bind socket on %s %s:%u. %s.\n", hostname, - ip_addr2strz(&ip), port, strerror(errno)); + LM_CRIT("failed to bind socket on %s:%u. %s.\n", hostname, + port, strerror(errno)); erl_close_socket(sockfd); freeaddrinfo(ai); @@ -128,8 +126,8 @@ int erl_passive_socket(const char *hostname, int qlen, if (ai->ai_socktype == SOCK_STREAM && listen(sockfd, qlen) < 0) { - LM_CRIT("failed to listen socket on %s, %s. %s.\n", hostname, - ip_addr2strz(&ip), strerror(errno)); + LM_CRIT("failed to listen socket on %s: %s.\n", hostname, + strerror(errno)); erl_close_socket(sockfd); freeaddrinfo(ai); diff --git a/src/modules/erlang/handle_emsg.c b/src/modules/erlang/handle_emsg.c index fe30b8d2ee..1e36be5cb6 100644 --- a/src/modules/erlang/handle_emsg.c +++ b/src/modules/erlang/handle_emsg.c @@ -640,6 +640,8 @@ int handle_rex_msg(cnode_handler_t *phandler, erlang_msg * msg) ei_x_buff *request = &phandler->request; ei_x_buff *response = &phandler->response; + memset((void*)&ref,0,sizeof(erlang_ref_ex_t)); + /* start from first arg */ request->index = 0; ei_decode_version(request->buff, &request->index, &version); diff --git a/src/modules/erlang/handle_rpc.c b/src/modules/erlang/handle_rpc.c index 5ca9ef21af..fccec06680 100644 --- a/src/modules/erlang/handle_rpc.c +++ b/src/modules/erlang/handle_rpc.c @@ -1138,6 +1138,8 @@ static int get_int(int *int_ptr,erl_rpc_ctx_t *ctx, int reads, int autoconvert) return -1; } + ei_decode_string(ctx->request->buff, &ctx->request_index, p); + *int_ptr = strtol(p,&endptr,10); if (p == endptr) { @@ -1217,6 +1219,8 @@ static int get_double(double *double_prt,erl_rpc_ctx_t *ctx, int reads, int auto return -1; } + ei_decode_string(ctx->request->buff, &ctx->request_index, p); + *double_prt = strtod(p,&endptr); if (p == endptr) {
6 years, 10 months
1
0
0
0
git:5.1:aac37ac2: erlang: fix copy into fixed size buffer of node name
by Seudin Kasumovic
Module: kamailio Branch: 5.1 Commit: aac37ac2aed455da79c406cc597ccc74d9138322 URL:
https://github.com/kamailio/kamailio/commit/aac37ac2aed455da79c406cc597ccc7…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-04T09:22:39+01:00 erlang: fix copy into fixed size buffer of node name Use length of node name string to avoid write past the end of the fixed-size destination buffer. (cherry picked from commit 53a76a4ae828cf08fbdebe08918706bd7d7d76d2) --- Modified: src/modules/erlang/cnode.c --- Diff:
https://github.com/kamailio/kamailio/commit/aac37ac2aed455da79c406cc597ccc7…
Patch:
https://github.com/kamailio/kamailio/commit/aac37ac2aed455da79c406cc597ccc7…
--- diff --git a/src/modules/erlang/cnode.c b/src/modules/erlang/cnode.c index 0eae7a716c..ce24c1dff4 100644 --- a/src/modules/erlang/cnode.c +++ b/src/modules/erlang/cnode.c @@ -111,7 +111,8 @@ int cnode_connect_to(cnode_handler_t *phandler, ei_cnode *ec, const str *nodenam LM_DBG("... connected to %.*s %s:%u\n", STR_FMT(nodename), ip_addr2strz(&ip), port); } - strcpy(phandler->conn.nodename, nodename->s); + strncpy(phandler->conn.nodename, nodename->s, nodename->len); + phandler->conn.nodename[nodename->len] = 0; /* for #Pid */ phandler->ec.self.num = phandler->sockfd;
6 years, 10 months
1
0
0
0
git:master:74778f3a: erlang: fix restore index of parsed tuple
by Seudin Kasumovic
Module: kamailio Branch: master Commit: 74778f3ac75432d475e9d54dc56f9c3b95c178a5 URL:
https://github.com/kamailio/kamailio/commit/74778f3ac75432d475e9d54dc56f9c3…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-03T23:21:41+01:00 erlang: fix restore index of parsed tuple Avoid to change origin index while parsing tuple. --- Modified: src/modules/erlang/handle_rpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/74778f3ac75432d475e9d54dc56f9c3…
Patch:
https://github.com/kamailio/kamailio/commit/74778f3ac75432d475e9d54dc56f9c3…
--- diff --git a/src/modules/erlang/handle_rpc.c b/src/modules/erlang/handle_rpc.c index b852892d9d..d45351bcc2 100644 --- a/src/modules/erlang/handle_rpc.c +++ b/src/modules/erlang/handle_rpc.c @@ -486,10 +486,10 @@ int erl_rpc_struct_scan(erl_rpc_ctx_t* ctx, char* fmt, ...) va_list ap; - /* save index */ + /* preserve index */ index = ctx->request_index; - if(ei_decode_tuple_header(ctx->request->buff,&ctx->request_index, &arity)) + if(ei_decode_tuple_header(ctx->request->buff,&index, &arity)) { erl_rpc_fault(ctx,400,"Bad tuple"); return -1; @@ -561,9 +561,6 @@ int erl_rpc_struct_scan(erl_rpc_ctx_t* ctx, char* fmt, ...) fmt++; } - /* restore index */ - ctx->request_index = index; - va_end(ap); return reads-modifiers;
6 years, 10 months
1
0
0
0
git:master:13c71a14: erlang: fix possible memory corruption
by Seudin Kasumovic
Module: kamailio Branch: master Commit: 13c71a14bfe4d2ee650521086bbae9920f95fcaa URL:
https://github.com/kamailio/kamailio/commit/13c71a14bfe4d2ee650521086bbae99…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-03T23:21:41+01:00 erlang: fix possible memory corruption Allocate sufficient memory for the terminating null of the string. --- Modified: src/modules/erlang/handle_rpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/13c71a14bfe4d2ee650521086bbae99…
Patch:
https://github.com/kamailio/kamailio/commit/13c71a14bfe4d2ee650521086bbae99…
--- diff --git a/src/modules/erlang/handle_rpc.c b/src/modules/erlang/handle_rpc.c index 5fe3c1f978..b852892d9d 100644 --- a/src/modules/erlang/handle_rpc.c +++ b/src/modules/erlang/handle_rpc.c @@ -223,7 +223,7 @@ int erl_rpc_add(erl_rpc_ctx_t* ctx, char* fmt, ...) param->type = ERL_STRING_EXT; param->value.S.len = strlen(char_ptr); - param->value.S.s = (char*)pkg_malloc(param->value.S.len); + param->value.S.s = (char*)pkg_malloc(param->value.S.len+1); if (!param->value.S.s) { @@ -696,7 +696,7 @@ int erl_rpc_struct_add(erl_rpc_ctx_t* ctx, char* fmt, ...) param->type = ERL_STRING_EXT; param->value.S.len = strlen(char_ptr); - param->value.S.s = (char*)pkg_malloc(param->value.S.len); + param->value.S.s = (char*)pkg_malloc(param->value.S.len+1); if (!param->value.S.s) { @@ -847,7 +847,7 @@ int erl_rpc_array_add(erl_rpc_ctx_t* ctx, char* fmt, ...) param->type = ERL_STRING_EXT; param->value.S.len = strlen(char_ptr); - param->value.S.s = (char*)pkg_malloc(param->value.S.len); + param->value.S.s = (char*)pkg_malloc(param->value.S.len+1); if (!param->value.S.s) {
6 years, 10 months
1
0
0
0
git:master:6542a367: erlang: fix never used value assigned to a variable
by Seudin Kasumovic
Module: kamailio Branch: master Commit: 6542a367638ec5f8a2b62994f8c309e7a2533962 URL:
https://github.com/kamailio/kamailio/commit/6542a367638ec5f8a2b62994f8c309e…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2018-01-03T23:21:41+01:00 erlang: fix never used value assigned to a variable --- Modified: src/modules/erlang/pv_xbuff.c --- Diff:
https://github.com/kamailio/kamailio/commit/6542a367638ec5f8a2b62994f8c309e…
Patch:
https://github.com/kamailio/kamailio/commit/6542a367638ec5f8a2b62994f8c309e…
--- diff --git a/src/modules/erlang/pv_xbuff.c b/src/modules/erlang/pv_xbuff.c index 1682e52f3b..ce6e2bd2eb 100644 --- a/src/modules/erlang/pv_xbuff.c +++ b/src/modules/erlang/pv_xbuff.c @@ -87,10 +87,10 @@ sr_xavp_t *xbuff_new(str *name) if(!xbuffs_root) { xbuff = xavp_add_xavp_value(&xbuff_list,name,&xbuff_val,xavp_get_crt_list()); + } else { + xbuff = xavp_get_child(&xbuff_list, name); } - xbuff=xavp_get_child(&xbuff_list, name); - if (!xbuff) { xbuff_val.type = SR_XTYPE_NULL;
6 years, 10 months
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
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
Results per page:
10
25
50
100
200