fix(decode): terminate the schema walk on a self-embedded pointer struct

Assisted-by: GLM 5.3
This commit is contained in:
2026-09-17 23:07:53 +02:00
parent bb238c98c3
commit a8d69d90d5
3 changed files with 42 additions and 1 deletions
+4
View File
@@ -41,6 +41,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Decoding into a struct that embeds a pointer to itself terminates. The
schema walk recursed through the embedded type forever, so such a
`Unmarshal` call hung the process; the walk now tracks the struct types on
the current path and stops when one repeats.
- An array-of-tables header whose path runs through an inline table
(`a = {b = {}}` followed by `[[a.b.c]]`) is rejected. The frozen-inline-table
check covered `[table]` headers and dotted keys but not the intermediate