Skip to content

Potential uninit memory access#177

Merged
srdja merged 1 commit into
srdja:masterfrom
giltho:fix-uninit
May 2, 2025
Merged

Potential uninit memory access#177
srdja merged 1 commit into
srdja:masterfrom
giltho:fix-uninit

Conversation

@giltho

@giltho giltho commented May 1, 2025

Copy link
Copy Markdown
Contributor

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 <[email protected]>
@srdja

srdja commented May 2, 2025

Copy link
Copy Markdown
Owner

Good catch! Thanks for fixing it!

@srdja srdja merged commit 932ca3d into srdja:master May 2, 2025
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