fix(napi): add missing nul byte to noop
Fixes a global-buffer-overflow bug
This commit is contained in:
parent
6a83c21e0c
commit
a109c54918
1 changed files with 1 additions and 1 deletions
|
@ -334,7 +334,7 @@ pub(crate) unsafe extern "C" fn noop(
|
||||||
sys::napi_throw_error(
|
sys::napi_throw_error(
|
||||||
env,
|
env,
|
||||||
ptr::null_mut(),
|
ptr::null_mut(),
|
||||||
CStr::from_bytes_with_nul_unchecked(b"Class contains no `constructor`, can not new it!")
|
CStr::from_bytes_with_nul_unchecked(b"Class contains no `constructor`, can not new it!\0")
|
||||||
.as_ptr(),
|
.as_ptr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue