Potential fix for code scanning alert no. 1537: Incorrect conversion between integer types (#43918)

This commit is contained in:
Luke Heath
2026-04-22 11:57:03 -05:00
committed by GitHub
parent 75d8102922
commit ca679561e5
+1 -1
View File
@@ -514,7 +514,7 @@ func getBodyTag(ctx context.Context, ds fleet.Datastore, host fleet.HostPolicyMe
var policy *calendar.PolicyLiteWithMeta
policyAny, ok := policyIDtoPolicy.Load(policyIDs[0])
if !ok {
id, err := strconv.ParseUint(policyIDs[0], 10, 64)
id, err := strconv.ParseUint(policyIDs[0], 10, strconv.IntSize)
if err != nil {
logger.ErrorContext(ctx, "parse policy id", "err", err)
// Do nothing