76e67fb3e06bf417b8cc428532181f9cda22320d
GetValue and Exists validated only the upper bound of a numeric key-path segment, so a negative index such as "arr.-1" passed the check and indexed the slice with -1, causing an index-out-of-range panic. Add a lower-bound check (i < 0) to the []int, []string and []any cases in both functions.
Description
My contributions to gookit/config: 2 commits, 1 merged PRs
45 KiB
0 Stars
1 Watchers
0 Forks
Languages
Go
100%