Skip to content

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

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

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

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

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 mhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@mhdawson

Copy link
Copy Markdown
Member

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

@Brooooooklyn

Copy link
Copy Markdown
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
Copy Markdown
Member

@Brooooooklyn thanks for updating, running CI.

@mhdawson mhdawson left a comment

Copy link
Copy Markdown
Member

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