Correctly handle the case where copystr(9) is given a string longer than

the passed in length. In this case we need to return ENAMETOOLONG.
This commit is contained in:
Andrew Turner 2016-02-02 10:11:56 +00:00
parent b4245df0a8
commit 5df33bf4df

View File

@ -56,6 +56,6 @@ copystr(const void * __restrict kfaddr, void * __restrict kdaddr, size_t len,
if (lencopied != NULL)
*lencopied = pos;
return (0);
return (error);
}