]> git.proxmox.com Git - wasi-libc.git/commit
Fix logic errors in the zero-inode path. (#352)
authorDan Gohman <dev@sunfishcode.online>
Tue, 6 Dec 2022 17:16:45 +0000 (09:16 -0800)
committerGitHub <noreply@github.com>
Tue, 6 Dec 2022 17:16:45 +0000 (09:16 -0800)
commit6cd1be1f88cd90f17114b95d3ee7e106694aa92b
tree76a133c34bde9cc309903f1489c18a72a3aec865
parent8098d8621ef6eeaa27f71bc4a0efb9dd51ea8f5e
Fix logic errors in the zero-inode path. (#352)

I've now tested the zero-inode path on a Wasm engine specially-modified
to have `fd_readdir` set inode numbers to zero. Fix two bugs this turned up:
 - Increment `buffer_processed`, as noticed by @yamt
 - Don't do an `fstatat` on "..", because that references a path outside
   of the directory, which gets a permission-denied error.
libc-bottom-half/cloudlibc/src/libc/dirent/readdir.c