Add some REVISIT comments.

This commit is contained in:
Gregory Nutt 2017-06-11 18:48:35 -06:00
parent a5d9587806
commit e6a8476382

View File

@ -196,7 +196,9 @@ static int lib_numeric_address(FAR const char *name, FAR struct hostent *host,
ptr += addrlen;
buflen -= addrlen;
/* And copy name */
/* And copy name
* REVISIT: Should the check not be (namelen + 1 > buflen)?
*/
namelen = strlen(name);
if (addrlen + namelen + 1 > buflen)
@ -284,7 +286,9 @@ static int lib_localhost(FAR const char *name, FAR struct hostent *host,
dest += addrlen;
buflen -= addrlen;
/* And copy name */
/* And copy name
* REVISIT: Should the check not be (namelen + 1 > buflen)?
*/
namelen = strlen(name);
if (addrlen + namelen + 1 > buflen)
@ -400,7 +404,9 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host,
ptr += addrlen;
buflen -= addrlen;
/* And copy the host name */
/* And copy name
* REVISIT: Should the check not be (namelen + 1 > buflen)?
*/
namelen = strlen(name);
if (addrlen + namelen + 1 > buflen)
@ -546,7 +552,9 @@ static int lib_dns_lookup(FAR const char *name, FAR struct hostent *host,
ptr += addrlen;
buflen -= addrlen;
/* And copy the name */
/* And copy name
* REVISIT: Should the check not be (namelen + 1 > buflen)?
*/
namelen = strlen(name);
if (addrlen + namelen + 1 > buflen)