Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thevilledev
Copy link

@thevilledev thevilledev commented Sep 23, 2025

NextBlock() now checks the result of Next() and stops when EOF is reached. This ensures the cursor always makes forward progress, eliminating a potential infinite loop when a block is unclosed.

Added a test to assert an unclosed block cannot cause NextBlock() to return the same token all over again.

This relates to an OSS-Fuzz finding #446778634.

NextBlock() now checks the result of Next() and stops when EOF is
reached, ensuring the cursor always makes forward progress. This
eliminates a potential infinite loop when a block is unclosed.

Added a test to assert an unclosed block cannot cause NextBlock()
to return the same token all over again.

Signed-off-by: Ville Vesilehto <[email protected]>
@thevilledev
Copy link
Author

hey @yongtang, would it be possible to get some help with the review? Relates to coredns/coredns#7571. Caddy tests pass locally and I'm checking that the CoreDNS tests pass too, with a temporary go.mod change in the meanwhile.

@yongtang yongtang merged commit 15135a9 into coredns:master Sep 30, 2025
1 check passed
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