pelletier / go-toml

Go library for the TOML file format
https://github.com/pelletier/go-toml
Other
1.73k stars 211 forks source link

Unchecked conversion between integer types on 32bit architectures #777

Closed pelletier closed 2 years ago

pelletier commented 2 years ago

https://github.com/pelletier/go-toml/blob/b2e0231cc93a72b48158c2bc7e01fd46d5fde74f/unmarshaler.go#L939-L939

On a 32bit platform uint can be uint32. So this code needs to validate that i is actually less than uint on the current platform. Not a problem on 64bit architectures where uint is uint64.

Tracking issue for: