Skip to content

Add detection of overflow during integer conversion #1130

@findmyhappy

Description

@findmyhappy

Summary

G109 provides detection of overflow during strconv.Atoi, but there seems to be no good way to detect the more common conversions between integers, such as uint32 to int32.

Steps to reproduce the behavior

gosec version

Go version (output of 'go version')

Operating system / Environment

Expected behavior

Actual behavior

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions