Re: [PATCH v2] dnsproxy: fix signedness warnings

Marcel Holtmann <[email protected]>
Newsgroups dev.linux.lists.connman
Message-ID <[email protected]>
Hi Brian,

> This fixes the signdness warnings in dnsproxy.c
> ---
> src/dnsproxy.c | 50 ++++++++++++++++++++++++++++++--------------------
> 1 file changed, 30 insertions(+), 20 deletions(-)
> 
> diff --git a/src/dnsproxy.c b/src/dnsproxy.c
> index d4242560..a25fde35 100644
> --- a/src/dnsproxy.c
> +++ b/src/dnsproxy.c
> @@ -417,30 +417,30 @@ static void refresh_dns_entry(struct cache_entry *entry, char *name)
> entry->hits = 0;
> }
> 
> -static size_t dns_name_length(const unsigned char *buf)
> +static size_t dns_name_length(const unsigned char *buf, size_t len)
> {
> if ((buf[0] & NS_CMPRSFLGS) == NS_CMPRSFLGS) /* compressed name */
> return 2;
> - return strlen((const char *)buf) + 1;
> + return strnlen((const char *)buf, len) + 1;
> }

<snip>

this patch does no longer apply. Is it still needed?

Regards

Marcel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.