fix proc_args from breaking on zero-length arg

This commit is contained in:
Doug MacEachern 2006-04-23 16:01:08 +00:00
parent a08034ba34
commit cac8fa29a6
1 changed files with 1 additions and 1 deletions

View File

@ -949,7 +949,7 @@ int sigar_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
sigar_proc_args_create(procargs);
while (*ptr && (nargs-- > 0)) {
while ((ptr < end) && (nargs-- > 0)) {
int alen = strlen(ptr)+1;
char *arg = malloc(alen);