Module: kamailio
Branch: master
Commit: 55d115e255b1d87121922f689b93870b84e1b2b4
URL:
https://github.com/kamailio/kamailio/commit/55d115e255b1d87121922f689b93870…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-06-10T22:39:35+02:00
core: dns name to IP conversion - actually stop processing in error case
---
Modified: src/core/resolve.h
---
Diff:
https://github.com/kamailio/kamailio/commit/55d115e255b1d87121922f689b93870…
Patch:
https://github.com/kamailio/kamailio/commit/55d115e255b1d87121922f689b93870…
---
diff --git a/src/core/resolve.h b/src/core/resolve.h
index e0089d0a19..6b1e6cff24 100644
--- a/src/core/resolve.h
+++ b/src/core/resolve.h
@@ -226,6 +226,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;
@@ -280,6 +281,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]=='[')){