Skip to main content

ss_runtime_load_ssab_borrow

Function ss_runtime_load_ssab_borrow 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_runtime_load_ssab_borrow( context: *mut c_void, ptr: *const c_uchar, len: usize, ) -> bool
Expand description

Create a resource that reads the len bytes at ptr in place and bind it to context, in one call, for a caller that needs no resource handle. Returns false with InvalidParameter for a null ptr, or InvalidVersion for a pack of another schema version.

§Security and Validation

To maximize performance and minimize binary size, libssruntime does not validate the input .ssab data. Passing corrupted or maliciously crafted data will cause undefined behavior (e.g., out-of-bounds reads). The caller MUST ensure the data is trusted or validated before passing it to this function.

§Safety

ptr must point to len readable bytes, which stay valid and unmodified until context is destroyed, reset or bound to another resource.