Skip to content
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

No actual reallocation and UB in about_arrays.c #13

Open
3JlOy-PYCCKUi opened this issue Apr 26, 2022 · 0 comments
Open

No actual reallocation and UB in about_arrays.c #13

3JlOy-PYCCKUi opened this issue Apr 26, 2022 · 0 comments

Comments

@3JlOy-PYCCKUi
Copy link

In the file about_arrays.c on line 81 the array int is allocated with 5 elements (defined on line 80), then in line 96 this array is reallocated again with 5 elements (with the same size variable), and then access to the 6th (on index 5) element of the array (of 5 elements) is undefined behavior

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

No branches or pull requests

1 participant