Skip to content

connected_components: fix off-by-one bounds check in toggle_axis() - #3450

Merged
jdtournier merged 1 commit into
MRtrix3:masterfrom
SID-6921:fix_connector_adjacency_toggle_axis_offbyone
Oct 15, 2026
Merged

jdtournier merged 1 commit into
MRtrix3:masterfrom
SID-6921:fix_connector_adjacency_toggle_axis_offbyone

Conversation

@SID-6921

@SID-6921 SID-6921 commented Oct 10, 2026 •

Copy link
Copy Markdown

Connector::Adjacency::toggle_axis() resized enabled_axes only when axis > enabled_axes.size(), so toggle_axis(enabled_axes.size(), ...) indexed one past the end of the vector instead of growing it first.

Connector::Adjacency::toggle_axis() resized enabled_axes only when
axis > enabled_axes.size(), so toggle_axis(enabled_axes.size(), ...)
indexed one past the end of the vector instead of growing it first.
Copilot AI balanced review requested due to automatic review settings October 10, 2026 01:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Lestropie Lestropie self-assigned this Oct 12, 2026
@Lestropie Lestropie added the bug label Oct 12, 2026

@Lestropie Lestropie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix looks correct to me; TY!

@jdtournier
jdtournier added this pull request to the merge queue Oct 15, 2026
Merged via the queue into MRtrix3:master with commit 92c6c2a Oct 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants