Description
Version and Platform (required):
- Binary Ninja Version: 5.1.7320-dev (aa12054b)
- OS: macOS 15.4.1
- CPU Architecture: arm64
Bug Description:
BnString::as_bytes_with_null
has no documentation, but based on its name I assumed it would include a trailing NUL. It doesn't. It returns a byte array of the string with the trailing NUL byte removed.
If it intends to include the NUL it should call through to CStr::to_bytes_with_nul
rather than CStr::to_bytes
.
It wouldn't hurt to update the method name to be consistent with the Rust standard library either (as
-> to
and null
-> nul
).