From 55d115e255b1d87121922f689b93870b84e1b2b4 Mon Sep 17 00:00:00 2001 From: Henning Westerholt Date: Sun, 10 Jun 2018 22:39:35 +0200 Subject: [PATCH] core: dns name to IP conversion - actually stop processing in error case --- src/core/resolve.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/resolve.h b/src/core/resolve.h index e0089d0a195..6b1e6cff24b 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]=='[')){