Skip to content

internal: fix MaxSizeSubjectsListForLog off-by-one when maxToDisplay is 0 - #7970

Merged
steadytao merged 5 commits into
masterfrom
fix-max-size-subjects-list-for-log-off-by-one
Sep 26, 2026
Merged

steadytao merged 5 commits into
masterfrom
fix-max-size-subjects-list-for-log-off-by-one

Conversation

@mohammed90

Copy link
Copy Markdown
Member

The loop appended before checking the length, so with maxToDisplay=0 one domain leaked into the output before the break check. Reorder so the length check comes first.

Assistance Disclosure

Test was generated by copilot/Claude 4.7; fixed by the same.

Related to #7227

…is 0

The loop appended before checking the length, so with maxToDisplay=0
one domain leaked into the output before the break check. Reorder so
the length check comes first.

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
@mohammed90 mohammed90 added the bug 🐞 Something isn't working label Aug 30, 2026
Comment thread internal/logs.go Resolved
Comment thread internal/logs.go Resolved
Co-authored-by: Zen Dodd <mail@steadytao.com>
Signed-off-by: Mohammed Al Sahaf <mohammed@caffeinatedwonders.com>
Comment thread internal/logs.go Resolved

@steadytao steadytao 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.

Thank ya kindly. LGTM.

@steadytao
steadytao merged commit fbc88ae into master Sep 26, 2026
32 checks passed
@steadytao
steadytao deleted the fix-max-size-subjects-list-for-log-off-by-one branch September 26, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants