Skip to content

Commit

Permalink
procfs:fix cmdline overflow
Browse files Browse the repository at this point in the history
Signed-off-by: anjiahao <[email protected]>
  • Loading branch information
anjiahao1 authored and xiaoxiang781216 committed Dec 12, 2024
1 parent a94264e commit 5e4c14d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/procfs/fs_procfsproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e4c14d

Please sign in to comment.