diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-01-21 14:14:10 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-01-25 15:52:30 +0000 |
| commit | 6af3cf27ed0072f2dcb17380ab63228f9aa28708 (patch) | |
| tree | f6b6ae37d66416735611251454b3367f5683268f | |
| parent | 072af59d46af264c835c8cda21d61b82fb4251ab (diff) | |
freebsd32_rusage_out(): bzero the compat32 structure
There is some padding on non-x86. Unconditionally bzero the memory to
avoid a leak.
Noted by: markj
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54592
| -rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 7913940338c2..8a2c179926d8 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -203,6 +203,7 @@ void freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32) { + bzero(s32, sizeof(*s32)); TV_CP(*s, *s32, ru_utime); TV_CP(*s, *s32, ru_stime); CP(*s, *s32, ru_maxrss); |
