Merge pull request #101327 from joelsmith/automated-cherry-pick-of-#101306-upstream-release-1.19

[1.19] Automated cherry pick of #101306: Additional CVE-2021-3121 fix
This commit is contained in:
Kubernetes Prow Robot 2021-04-21 12:05:51 -07:00 committed by GitHub
commit 3e8d456f2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,7 +166,7 @@ func (m *Quantity) Unmarshal(data []byte) error {
if err != nil {
return err
}
if skippy < 0 {
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {