clear message structure before filling it in

This change clears the message structure before filling it in. This prevents uninitialized stack data from vfs leaking to a file system driver.
This commit is contained in:
Ilja van Sprundel 2019-10-11 22:36:14 +02:00 committed by GitHub
parent d51e668f60
commit a8d533d2c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1202,6 +1202,7 @@ int req_utime(endpoint_t fs_e, ino_t inode_nr, struct timespec * actimespec,
assert(actimespec != NULL);
assert(modtimespec != NULL);
memset(&m, 0, sizeof(m));
/* Fill in request message */
m.m_type = REQ_UTIME;
m.m_vfs_fs_utime.inode = inode_nr;