Skip to content

Commit

Permalink
fix: Remove invalid memory access for tracing field
Browse files Browse the repository at this point in the history
Could read invalid memory and cause UB
  • Loading branch information
theduke committed Mar 7, 2023
1 parent 36eddab commit 202d9f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/wasi/src/syscalls/wasi/fd_prestat_dir_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub fn fd_prestat_dir_name<M: MemorySize>(
let path_chars = wasi_try_mem!(path.slice(&memory, path_len));

let inode = wasi_try!(state.fs.get_fd_inode(fd));
Span::current().record("path", inode.name.as_ref());

// check inode-val.is_preopened?

Expand Down

0 comments on commit 202d9f1

Please sign in to comment.