From d58d668f8642532c78e500d84984b8537f4b39d3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 8 Jul 2015 16:25:16 -0600 Subject: [PATCH] Fix an addressing problem in host file read logic --- libc/net/lib_parsehostfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/net/lib_parsehostfile.c b/libc/net/lib_parsehostfile.c index dbef59cf94..bc21322122 100644 --- a/libc/net/lib_parsehostfile.c +++ b/libc/net/lib_parsehostfile.c @@ -287,7 +287,7 @@ ssize_t lib_parse_hostfile(FAR FILE *stream, FAR struct hostent *host, addrstring[0] = ch; - nwritten = lib_copystring(stream, addrstring, &nread, 48, &ch); + nwritten = lib_copystring(stream, &addrstring[1], &nread, 47, &ch); if (nwritten <= 0) { return nwritten;