Fix an addressing problem in host file read logic

This commit is contained in:
Gregory Nutt 2015-07-08 16:25:16 -06:00
parent 1cd4ef1730
commit d58d668f86

View File

@ -287,7 +287,7 @@ ssize_t lib_parse_hostfile(FAR FILE *stream, FAR struct hostent *host,
addrstring[0] = ch; addrstring[0] = ch;
nwritten = lib_copystring(stream, addrstring, &nread, 48, &ch); nwritten = lib_copystring(stream, &addrstring[1], &nread, 47, &ch);
if (nwritten <= 0) if (nwritten <= 0)
{ {
return nwritten; return nwritten;