Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sanitize the return value of memcmp() to wasm
For wasm’s memcmp, we farm it out to the system's memcmp, however the c specification states that memcmp only needs to return less than 0, 0, or greater than 0. It's implementation specific how much less than or greater than 0 it is. So, sanitize the return value to only ever be -1, 0, 1.
- Loading branch information