Skip to content

Commit

Permalink
prctl: fix printing of PR_SET_NAME's argument
Browse files Browse the repository at this point in the history
* prctl.c (SYS_FUNC(prctl)): Use printstr_ex with QUOTE_0_TERMINATED
instead of printstr to print the argument of PR_SET_NAME and PR_GET_NAME
operations.
  • Loading branch information
ldv-alt committed Nov 20, 2016
1 parent 52b85c6 commit 43017ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prctl.c
Expand Up @@ -104,7 +104,8 @@ SYS_FUNC(prctl)
if (syserror(tcp))
printaddr(tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], -1);
printstr_ex(tcp, tcp->u_arg[1], TASK_COMM_LEN,
QUOTE_0_TERMINATED);
}
break;

Expand Down Expand Up @@ -207,7 +208,8 @@ SYS_FUNC(prctl)

case PR_SET_NAME:
tprints(", ");
printstr(tcp, tcp->u_arg[1], TASK_COMM_LEN);
printstr_ex(tcp, tcp->u_arg[1], TASK_COMM_LEN - 1,
QUOTE_0_TERMINATED);
return RVAL_DECODED;

#ifdef __ANDROID__
Expand Down

0 comments on commit 43017ef

Please sign in to comment.