Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

fix: channel_id range checks when channel_count is zero#832

Open
MozirDmitriy wants to merge 1 commit intoIrreducibleOSS:mainfrom
MozirDmitriy:fix/channel-id-bounds-check
Open

fix: channel_id range checks when channel_count is zero#832
MozirDmitriy wants to merge 1 commit intoIrreducibleOSS:mainfrom
MozirDmitriy:fix/channel-id-bounds-check

Conversation

@MozirDmitriy
Copy link

Replace max-index comparison using saturating_sub with a direct length-based guard. This prevents out-of-bounds panics when channel_count == 0 by rejecting channel_id >= channel_count. Keeps error payload consistent by still reporting the computed max.

@graphite-app
Copy link

graphite-app bot commented Aug 28, 2025

How to use the Graphite Merge Queue

Add the label merge-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant