parisc: sys_hpux: NUL terminator is one past the end
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 31 Jul 2014 15:20:20 +0000 (18:20 +0300)
committerHelge Deller <deller@gmx.de>
Wed, 27 Aug 2014 12:33:46 +0000 (14:33 +0200)
commit3067bbd1ad8601418a32b839f7a8a2fee9b44bd1
treee1904a8727024097863224b71347a641d587bd0e
parent68e370289c29e3beac99d59c6d840d470af9dfcf
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/hpux/sys_hpux.c