mirror of
https://github.com/moby/moby.git
synced 2026-07-24 16:26:51 +00:00
libnet/d/overlay/overlayutils: prevent uint32 overflow
CodeQL was complaining about the conversion to uint32 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -51,7 +51,7 @@ func AppendVNIList(vnis []uint32, csv string) ([]uint32, error) {
|
||||
found bool
|
||||
)
|
||||
vniStr, csv, found = strings.Cut(csv, ",")
|
||||
vni, err := strconv.Atoi(vniStr)
|
||||
vni, err := strconv.ParseUint(vniStr, 10, 32)
|
||||
if err != nil {
|
||||
return vnis, fmt.Errorf("invalid vxlan id value %q passed", vniStr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user