You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle empty/null Buffer in JsReturn::from_napi_value
napi_get_buffer_info returns data=null with len=0 for empty buffers.
slice::from_raw_parts requires a non-null pointer even for zero-length
slices, which caused a panic when returning empty buffers from host
functions.
- Handle len=0 case specially by returning Vec::new() directly
- Add explicit null check with error for data=null with len > 0
- Add vitest for host returning Buffer.alloc(0) to guest
0 commit comments