Additional CVE-2021-3121 fix

This commit is contained in:
Joel Smith 2021-04-20 23:31:12 -06:00
parent 3cc043cfd2
commit 9b54a72bb8

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 {