Memory Integer Overflow

Golang's `int` type size depends on the architecture of where the application is running. For 32-bit systems, `int` is 32-bit, for 64-bit systems, `int` will be 64-bit. By calling `strconv.Atoi` with a large number, the integer may overflow if the `int` return value is type converted into a smaller type (`int32` or `int16`). This could cause unexpected appli

IndexedPublic repositoryHighHigh confidenceVerifiedApache-2.0Go
greprules fetch gitlab-sast-go-memory-rule-integer-overflow --engine opengrep

Description

Golang's `int` type size depends on the architecture of where the application is running. For 32-bit systems, `int` is 32-bit, for 64-bit systems, `int` will be 64-bit. By calling `strconv.Atoi` with a large number, the integer may overflow if the `int` return value is type converted into a smaller type (`int32` or `int16`). This could cause unexpected appli