redhat analysis: ps/parser
This commit is contained in:
parent
8f3303e4d8
commit
6317f8e685
@ -119,6 +119,7 @@ static const char *parse_gid(char *str, sel_union *ret){
|
|||||||
|
|
||||||
static const char *parse_cmd(char *str, sel_union *ret){
|
static const char *parse_cmd(char *str, sel_union *ret){
|
||||||
strncpy(ret->cmd, str, sizeof ret->cmd); // strncpy pads to end
|
strncpy(ret->cmd, str, sizeof ret->cmd); // strncpy pads to end
|
||||||
|
ret->cmd[sizeof(ret->cmd)-1] = '\0'; // but let's be safe
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user