mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Treat empty string as nil in fuzzer for CEL Reason field
This commit is contained in:
parent
d25c0a1bdb
commit
22bf29ad22
@ -181,5 +181,11 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
|
|||||||
// JSON only supports 53 bits because everything is a float
|
// JSON only supports 53 bits because everything is a float
|
||||||
*obj = int64(c.Uint64()) & ((int64(1) << 53) - 1)
|
*obj = int64(c.Uint64()) & ((int64(1) << 53) - 1)
|
||||||
},
|
},
|
||||||
|
func(obj *apiextensions.ValidationRule, c fuzz.Continue) {
|
||||||
|
c.FuzzNoCustom(obj)
|
||||||
|
if obj.Reason != nil && *(obj.Reason) == "" {
|
||||||
|
obj.Reason = nil
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user