Skip to content

Commit

Permalink
lua: fix function param buffers size in lua_exec()
Browse files Browse the repository at this point in the history
(cherry picked from commit 0cd1b9f)
  • Loading branch information
rvlad-patrascu committed May 28, 2019
1 parent 6c35381 commit f964064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/lua/sipstate.c
Expand Up @@ -435,7 +435,7 @@ int sipstate_call(struct sip_msg *msg, const str *_fnc_s, const str *_mystr_s)
int n;
char *fnc, *mystr = NULL;

fnc = pkg_malloc(_fnc_s->len);
fnc = pkg_malloc(_fnc_s->len+1);
if (!fnc) {
LM_ERR("No more pkg mem!\n");
return -1;
Expand All @@ -444,7 +444,7 @@ int sipstate_call(struct sip_msg *msg, const str *_fnc_s, const str *_mystr_s)
fnc[_fnc_s->len] = 0;

if (_mystr_s) {
mystr = pkg_malloc(_mystr_s->len);
mystr = pkg_malloc(_mystr_s->len+1);
if (!mystr) {
LM_ERR("No more pkg mem!\n");
return -1;
Expand Down

0 comments on commit f964064

Please sign in to comment.