mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
libprocstat: copy all the 32-bit auxv entries
Use source struct size not the destination struct size so we copy all
the auxv entries, not just the first half of them.
Fix a style issue on an adjacent line.
Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D42200
(cherry picked from commit 8f06fabe39
)
This commit is contained in:
parent
efeba8da1d
commit
ea7f064a78
@ -2437,8 +2437,8 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp)
|
||||
warn("sysctl: kern.proc.auxv: %d: %d", pid, errno);
|
||||
goto out;
|
||||
}
|
||||
count = len / sizeof(Elf_Auxinfo);
|
||||
auxv = malloc(count * sizeof(Elf_Auxinfo));
|
||||
count = len / sizeof(Elf32_Auxinfo);
|
||||
auxv = malloc(count * sizeof(Elf_Auxinfo));
|
||||
if (auxv == NULL) {
|
||||
warn("malloc(%zu)", count * sizeof(Elf_Auxinfo));
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user