mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()
This code does not allocate enough memory for the NUL terminator so it
ends up putting it one character beyond the end of the buffer.
Fixes: 8756828a81
("octeontx2-af: Add NPA aura and pool contexts to debugfs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d310ec03a3
commit
3a2eb515d1
1 changed files with 1 additions and 1 deletions
|
@ -473,7 +473,7 @@ static ssize_t rvu_dbg_qsize_write(struct file *filp,
|
||||||
u16 pcifunc;
|
u16 pcifunc;
|
||||||
int ret, lf;
|
int ret, lf;
|
||||||
|
|
||||||
cmd_buf = memdup_user(buffer, count);
|
cmd_buf = memdup_user(buffer, count + 1);
|
||||||
if (IS_ERR(cmd_buf))
|
if (IS_ERR(cmd_buf))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue