-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix character boundary issues in preview1 host adapter (#7011)
* Fix character boundary issues in preview1 host adapter This fixes two separate issues in the preview1-to-preview2 host-side adapter in the `wasmtime-wasi` crate. Both instances were copying a truncated string to the guest program but the truncation was happening in the middle of a unicode character so truncation now happens on bytes instead of a string. * Update `write_bytes` to take `&[u8]` Try to weed out any accidental string-related issues for the future.
- Loading branch information
1 parent
f2b43d8
commit 04b09c8
Showing
3 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters