Skip to content

Fix off-by-one error in status lists#12

Open
nodh wants to merge 1 commit into
developmentfrom
feature/status-list-fix
Open

Fix off-by-one error in status lists#12
nodh wants to merge 1 commit into
developmentfrom
feature/status-list-fix

Conversation

@nodh

@nodh nodh commented Jun 24, 2026

Copy link
Copy Markdown
Member

No description provided.

@nodh nodh requested a review from JesusMcCloud June 24, 2026 11:21
@nodh nodh self-assigned this Jun 24, 2026
return List(maxRevocationListIndex.toInt()) { listIndex ->
// Revocation list indexes are 1-based, so the list needs `maxRevocationListIndex + 1` entries
// for the credential at the highest index (e.g. the one just issued) to be included and reported as valid.
return List(maxRevocationListIndex.toInt() + 1) { listIndex ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add a check that this does not exceed Int.MAX_VALUE (or any other, much more sensible lower guard) like so: require(maxRevocationListIndex + 1 <Int.MAX_VALUE) {"Revocation list too large"}

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