Skip to content

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

Merged
mhdawson merged 1 commit intonodejs:mainfrom
Brooooooklyn:main
May 2, 2024
Merged

Fix extra trailing '\0' char in uvwasi_path_readlink#263
mhdawson merged 1 commit intonodejs:mainfrom
Brooooooklyn:main

Conversation

@Brooooooklyn
Copy link
Contributor

@Brooooooklyn Brooooooklyn commented Apr 24, 2024

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.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson
Copy link
Member

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

@Brooooooklyn
Copy link
Contributor Author

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

@mhdawson
Copy link
Member

@Brooooooklyn thanks for updating, running CI.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson mhdawson merged commit 38d124c into nodejs:main May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The result read_link is followed by an extra \0

2 participants