nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
222 stars 48 forks source link

fix: use old_path_len argument in symlink creation #234

Closed alex-snezhko closed 7 months ago

alex-snezhko commented 9 months ago

Currently the old_path_len argument is ignored in the implementation of path_symlink and the call to uv_fs_symlink uses the original null-terminated old_path, which differs to how the path_len arguments in other functions are treated.

This PR truncates the "old path" passed to libuv down to the length passed into old_path_len.