Skip to content

fix: initialise key to avoid undefined behaviour #2984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Aug 17, 2025

Description of Change

key has to be initialized before readings its value in the while loop below.

Checklist

  • Added description of change
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
Initialise key to avoid UB.

@vil02 vil02 force-pushed the fix_uninitialized_variable_read branch from 825d2dc to 1c93a96 Compare August 17, 2025 22:13
@vil02 vil02 marked this pull request as ready for review August 17, 2025 22:13
@vil02 vil02 requested a review from realstealthninja August 18, 2025 06:31
@realstealthninja realstealthninja merged commit c917fc4 into TheAlgorithms:master Aug 18, 2025
12 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