mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04: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
9b48cb8e89
commit
ff90744045
1 changed files with 2 additions and 2 deletions
|
|
@ -2434,8 +2434,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 a new issue