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

ma_triangle_route goes out of bounds #1586

Merged
merged 1 commit into from
Jul 2, 2022

Conversation

xtremeqg
Copy link
Contributor

@xtremeqg xtremeqg commented Jul 2, 2022

Fixes #1585

src/ariadne.c: In function ‘ma_triangle_route’:
src/ariadne.c:1944:28: warning: iteration 3517 invokes undefined behavior [-Waggressive-loop-optimizations]
1944 | tree_route[i] = route_fwd[i];
src/ariadne.c:1942:9: note: within this loop
1942 | for (i=0; i <= sizeof(tree_route)/sizeof(tree_route[0]); i++)

Fixes dkfans#1585

src/ariadne.c: In function ‘ma_triangle_route’:
src/ariadne.c:1944:28: warning: iteration 3517 invokes undefined behavior [-Waggressive-loop-optimizations]
 1944 |              tree_route[i] = route_fwd[i];
src/ariadne.c:1942:9: note: within this loop
 1942 |         for (i=0; i <= sizeof(tree_route)/sizeof(tree_route[0]); i++)
@Loobinex
Copy link
Member

Loobinex commented Jul 2, 2022

Great, thanks. I'll test and merge soon.

If you're not already a member on the discord, feel free to join: https://discord.gg/zKTjfDh
And if you are, say Hi so we will add you to the developer channel.

@Loobinex Loobinex merged commit 8d8f4eb into dkfans:master Jul 2, 2022
@xtremeqg xtremeqg deleted the out-of-bounds-1 branch July 3, 2022 05:37
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.

ma_triangle_route goes out of bounds
2 participants