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
if (!cjose_base64url_encode((constuint8_t*)hdr_str, strlen(hdr_str), &jws->hdr_b64u, &jws->hdr_b64u_len, err))
{
free(hdr_str);
return false;
}
free(hdr_str);
json_dumps allocatos hdr_str using the custom allocator. However later hdr_str is freed using free and not the set deallocator. So this (can) lead to a segfault.
I suggest to replace the calls to free with cjose_get_dealloc()
The text was updated successfully, but these errors were encountered:
When setting a custom memory allocator and deallocator using
cjose/src/util.c
Line 60 in 9261231
it is also applied to json.
In
cjose/src/jws.c
Lines 54 to 65 in 254ab05
json_dumps
allocatoshdr_str
using the custom allocator. However laterhdr_str
is freed usingfree
and not the set deallocator. So this (can) lead to a segfault.I suggest to replace the calls to
free
withcjose_get_dealloc()
The text was updated successfully, but these errors were encountered: