Skip to main content

ss_resource_create_copy

Function ss_resource_create_copy 

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

Create a resource from a copy of the len bytes at ptr, which may be freed on return. Release it with ss_resource_destroy. Returns null for a null ptr or 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.