don't trust filesystem we're calling out to
This change guarantees the vfs stat buffer is initialized. In the event that the fs we're calling in to is lying (says it wrote into buf, but really didn't) uninitialized vfs stack data would get send to the vfs caller.
This commit is contained in:
parent
f7973340e6
commit
d51e668f60
|
|
@ -239,6 +239,7 @@ int req_statvfs(endpoint_t fs_e, struct statvfs *buf)
|
|||
cp_grant_id_t grant_id;
|
||||
message m;
|
||||
|
||||
memset(buf, 0x00, sizeof(struct statvfs));
|
||||
grant_id = cpf_grant_direct(fs_e, (vir_bytes) buf, sizeof(struct statvfs),
|
||||
CPF_WRITE);
|
||||
if(grant_id == GRANT_INVALID)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user