Skip to content

Conversation

@giltho
Copy link
Contributor

@giltho giltho commented May 1, 2025

cc_queue_new_conf calls cc_deque_new_conf with &deque as parameter.

However, in case of allocation error, cc_deque_new_conf may return early without executing the *d = deque statement at the end of the function, leaving the input parameter uninitialised.

Then, deque is checked in cc_queue_new_conf, but if allocation failed, it is not NULL, it is just uninitialised, leading to undefined behaviour.

Signed-off-by: Sacha-Élie Ayoun <sachaayoun@gmail.com>
@srdja
Copy link
Owner

srdja commented May 2, 2025

Good catch! Thanks for fixing it!

@srdja srdja merged commit 932ca3d into srdja:master May 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants