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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user