google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.3k stars 209 forks source link

Fix: Immutability of Int is broken by BigInt method (#332) #333

Closed cloudgerman closed 3 years ago

cloudgerman commented 3 years ago

The interface of Int assumes the value is immutable but a reference to its content is leaked through the BigInt() method, which is mutable. This fix resolves the leak by:

Fixes: #332

cloudgerman commented 3 years ago

No problem! comments have now the fixes requested