sanity check
This commit is contained in:
parent
883cfa1586
commit
5f05b3383d
@ -1002,7 +1002,9 @@ int sigar_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
* to messing with argv[0]
|
||||
*/
|
||||
while (*(ptr + (slen-1)) == ' ') {
|
||||
--slen;
|
||||
if (--slen <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
arg = malloc(slen+1);
|
||||
|
Loading…
Reference in New Issue
Block a user