Module: kamailio Branch: 5.1 Commit: 2f63caf7ac87c1eca9c6f4150dc7418fa9f4fc35 URL: https://github.com/kamailio/kamailio/commit/2f63caf7ac87c1eca9c6f4150dc7418f...
Author: Henning Westerholt hw@kamailio.org Committer: Henning Westerholt hw@kamailio.org Date: 2018-06-10T22:46:15+02:00
core: dns name to IP conversion - actually stop processing in error case
(cherry picked from commit 55d115e255b1d87121922f689b93870b84e1b2b4)
---
Modified: src/core/resolve.h
---
Diff: https://github.com/kamailio/kamailio/commit/2f63caf7ac87c1eca9c6f4150dc7418f... Patch: https://github.com/kamailio/kamailio/commit/2f63caf7ac87c1eca9c6f4150dc7418f...
---
diff --git a/src/core/resolve.h b/src/core/resolve.h index 30cce19581..1946d25081 100644 --- a/src/core/resolve.h +++ b/src/core/resolve.h @@ -232,6 +232,7 @@ static inline struct ip_addr* str2ip(str* st) /* 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; } s=(unsigned char*)st->s;
@@ -288,6 +289,7 @@ static inline struct ip_addr* str2ip6(str* st) /* 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; } /* init */ if ((st->len) && (st->s[0]=='[')){