Skip to content

fix(key): prevent stack overflow on cyclic key variable references - #415

Merged
unknwon merged 1 commit into
go-ini:v1from
AdamMagued:fix-issue-409
Nov 11, 2026
Merged

unknwon merged 1 commit into
go-ini:v1from
AdamMagued:fix-issue-409

Conversation

@AdamMagued

Copy link
Copy Markdown

Fixes #409

Summary

  • Guard variable expansion in Key.String() against cyclic references via recursion cycle tracking.
  • Add unit tests for mutual, self-referencing, and multi-hop cyclic key references.

Verified via container sandbox test suite.

Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
@unknwon
unknwon merged commit 5108fdc into go-ini:v1 Nov 11, 2026
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.

Key.String() overflows the stack when two keys reference each other

2 participants