Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(runtime-c-api) Check buffer size before creating the slice.
It's safer to check the buffer size is large enough to hold the error message before creating the slice from raw parts. Also, this patch remove the need for `last_error`, simplifying the code a little bit. The `length` variable is casted to `usize` once.
- Loading branch information