Function
FwupdPluginmemmem_safe
Declaration [src]
gboolean
fu_memmem_safe (
const guint8* haystack,
gsize haystack_sz,
const guint8* needle,
gsize needle_sz,
gsize* offset,
GError** error
)
Description [src]
Finds a block of memory in another block of memory in a safe way.
Available since: | 1.8.2 |
Parameters
haystack |
const guint8* |
Destination buffer. |
|
The data is owned by the caller of the function. | |
haystack_sz |
gsize |
Maximum size of |
|
needle |
const guint8* |
Source buffer. |
|
The data is owned by the caller of the function. | |
needle_sz |
gsize |
Maximum size of |
|
offset |
gsize* |
Offset in bytes |
|
The argument will be set by the function. | |
The argument can be set to NULL . | |
The called function takes ownership of the data, and is responsible for freeing it. | |
error |
GError ** |
The return location for a GError* , or NULL . |