plugin possible (but very unlikely) leak in proc_args if argc > 56 and pread error
This commit is contained in:
parent
77e652803d
commit
9ec93a73ed
|
@ -718,6 +718,9 @@ int sigar_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
|
|||
|
||||
if ((nread = pread(fd, argvp, argv_size, pinfo->pr_argv)) <= 0) {
|
||||
close(fd);
|
||||
if (argvp != argvb) {
|
||||
free(argvp);
|
||||
}
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
@ -733,6 +736,9 @@ int sigar_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
|
|||
|
||||
if ((nread = pread(fd, buffer, sizeof(buffer), (off_t)argvp[n])) <= 0) {
|
||||
close(fd);
|
||||
if (argvp != argvb) {
|
||||
free(argvp);
|
||||
}
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue