nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
226 stars 51 forks source link

Fix extra trailing '\0' char in uvwasi_path_readlink #263

Closed Brooooooklyn closed 5 months ago

Brooooooklyn commented 5 months ago

According to the WASI spec: https://github.com/WebAssembly/WASI/blob/v0.2.0/legacy/preview1/witx/wasi_snapshot_preview1.witx#L389 The path_readlink should behave the same as the posix readlinkat, so that the bufused should not contain the null termination.

mhdawson commented 5 months ago

@Brooooooklyn looks like some of the tests fail, can you take a look?

Brooooooklyn commented 5 months ago

@mhdawson, my last fix was wrong, so I've updated my patch. The test should pass now. Thanks for the review.

mhdawson commented 5 months ago

@Brooooooklyn thanks for updating, running CI.