Skip to content

Commit

Permalink
Additional CVE-2021-3121 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmith committed Apr 21, 2021
1 parent 75fcfc3 commit 0fed52d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0fed52d

Please sign in to comment.