Skip to content

Commit

Permalink
core: bug fix in str2ipbuf, return an error for invalid input parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Nov 12, 2019
1 parent 96fedc5 commit a48d87d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/resolve.c
Expand Up @@ -1738,7 +1738,7 @@ int str2ipbuf(str* st, ip_addr_t* ipb)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
return 0;
return -1;
}
s=(unsigned char*)st->s;

Expand Down

0 comments on commit a48d87d

Please sign in to comment.