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:
Sebastiaan van Stijn
2025-05-30 14:00:14 +02:00
parent 45873be4ae
commit fca97dae9d

View File

@@ -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)
}