- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for multiplyWithOverflowGuard (0.22 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/cel_validation.go
} if c.MaxCardinality == unbounded { return result } maxElements := extractMaxElements(c.jsonSchema) if maxElements == unbounded { return result } result.MaxCardinality = uint64ptr(multiplyWithOverflowGuard(*c.MaxCardinality, *maxElements)) return result } type typeInfoAccessor interface { // accessTypeInfo looks up type information for a child schema from a non-nil parentTypeInfo and returns it,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 10 22:05:55 UTC 2022 - 13.8K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go
_, _, err := cel.ValidFieldPath(path, ss) return err == nil } return true } // multiplyWithOverflowGuard returns the product of baseCost and cardinality unless that product // would exceed math.MaxUint, in which case math.MaxUint is returned. func multiplyWithOverflowGuard(baseCost, cardinality uint64) uint64 { if baseCost == 0 { // an empty rule can return 0, so guard for that here return 0
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 82.6K bytes - Viewed (0)