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
bug: ensure FFI glue always passes a valid pointer
Previously, if a caller provided a `&Vec::new()` to the
search function, then the library would pass that vec's
pointer to PCRE2 directly. Since creating an empty Vec
does not allocate, this pointer is actually invalid and
cannot be dereferenced. However, PCRE2 (rightfully)
assumes the pointer it is handed is valid.
We fix this by detecting the case of an empty slice.
If it's empty, we pass a pointer to an empty slice that
we know is valid.
0 commit comments