Commit 61a92ef7 authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #28441 from smarterclayton/reflect_check

Automatic merge from submit-queue ObjectReflectDiff has an incorrect array index comparison Is comparing the wrong field for bounds. @deads2k
parents a75cb46e ee561236
......@@ -177,10 +177,10 @@ func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff {
}
}
var diffs []diff
for i := l; l < lA; i++ {
for i := l; i < lA; i++ {
diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil})
}
for i := l; l < lB; i++ {
for i := l; i < lB; i++ {
diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)})
}
return diffs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment