strcpy -> strlcpy paranoia
Submitted by: Mike Heffner <mheffner@vt.edu> Reviewed by: freebsd-audit
This commit is contained in:
parent
4d5a3a7a50
commit
e31b3502a1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user