parisc: sys_hpux: NUL terminator is one past the end
We allocate "len" number of chars so we should put the NUL at "len - 1" to avoid corrupting memory. Btw, strlen_user() is different from the normal strlen() function because it includes NUL terminator in the count. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NHelge Deller <deller@gmx.de>
Showing
想要评论请 注册 或 登录