procfs:fix cmdline overflow
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
a94264ea00
commit
5e4c14d8e8
1 changed files with 2 additions and 2 deletions
|
@ -687,9 +687,9 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile,
|
|||
|
||||
/* Show the task / thread argument list (skipping over the name) */
|
||||
|
||||
linesize = nxtask_argvstr(tcb, procfile->line, remaining);
|
||||
linesize = nxtask_argvstr(tcb, procfile->line, sizeof(procfile->line));
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
||||
remaining, &offset);
|
||||
sizeof(procfile->line), &offset);
|
||||
totalsize += copysize;
|
||||
buffer += copysize;
|
||||
remaining -= copysize;
|
||||
|
|
Loading…
Reference in a new issue