strcpy -> strlcpy paranoia

Submitted by:	Mike Heffner <mheffner@vt.edu>
Reviewed by:	freebsd-audit
This commit is contained in:
Jacques Vidrine 2001-02-02 13:22:43 +00:00
parent 4d5a3a7a50
commit e31b3502a1

View File

@ -162,7 +162,10 @@ hesiod_to_bind(void *context, const char *name, const char *type)
const char *rhs;
int len;
strcpy(bindname, name);
if (strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) {
errno = EMSGSIZE;
return NULL;
}
/*
* Find the right right hand side to use, possibly