Browse code

core: bug fix in str2ipbuf, return an error for invalid input parameter

Henning Westerholt authored on 12/11/2019 11:18:06
Showing 1 changed files
... ...
@@ -1738,7 +1738,7 @@ int str2ipbuf(str* st, ip_addr_t* ipb)
1738 1738
 	/* just in case that e.g. the VIA parser get confused */
1739 1739
 	if(unlikely(!st->s || st->len <= 0)) {
1740 1740
 		LM_ERR("invalid name, no conversion to IP address possible\n");
1741
-		return 0;
1741
+		return -1;
1742 1742
 	}
1743 1743
 	s=(unsigned char*)st->s;
1744 1744