Skip to content

Commit

Permalink
[jabber] Fixed compiler warning.
Browse files Browse the repository at this point in the history
Even if harmless, make the code consistent and avoid warnings - if using null-terimated functions, be sure you have the space for the the ending NULL.
Reported by Dan Pascu ( @danpascu )

(cherry picked from commit 73c2fe9)
  • Loading branch information
bogdan-iancu committed May 29, 2019
1 parent 3f7a471 commit 7b8cea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/jabber/xjab_wlist.c
Expand Up @@ -457,7 +457,7 @@ int xj_wlist_set_aliases(xj_wlist jwl, char *als, char *jd, char *pa)
if(i < 4 || pa[0]!='s' || pa[1]!='i' || pa[2]!='p' || pa[3]!=':')
jwl->aliases->proxy->len += 4;
if((jwl->aliases->proxy->s=
(char*)_M_SHM_MALLOC(jwl->aliases->proxy->len))
(char*)_M_SHM_MALLOC(jwl->aliases->proxy->len+1))
== NULL)
{
LM_DBG("not enough SHMemory!!!\n");
Expand Down

0 comments on commit 7b8cea7

Please sign in to comment.