oidc_child: add missing NULL checks and avoid double-free#8785
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces safety checks to prevent null pointer dereferences and potential crashes. Specifically, it validates that the certificate and private key are successfully extracted from the PKCS#12 file in oidc_child_get_jwk.c, and ensures that the PKCS#12 client credentials path is not null before attempting to open it in oidc_child_json.c. Additionally, it removes an unnecessary json_decref call on payload_b64 when json_pack fails, as the reference is already stolen by the 'o' format specifier. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
The reference is always stolen if the 'o' format specifier is used even in the case of errors. Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Alexey Tikhonov <[email protected]>
No description provided.