mirror of
https://github.com/google/go-attestation.git
synced 2025-02-21 01:11:21 +00:00
Fix integer overflow in digest parsing (#211)
This commit is contained in:
parent
b89180c3eb
commit
31ad4f57fd
@ -712,7 +712,7 @@ func parseRawEvent2(r *bytes.Buffer, specID *specIDEvent) (event rawEvent, err e
|
||||
if alg.ID != algID {
|
||||
continue
|
||||
}
|
||||
if uint16(r.Len()) < alg.Size {
|
||||
if r.Len() < int(alg.Size) {
|
||||
return event, fmt.Errorf("reading digest: %v", io.ErrUnexpectedEOF)
|
||||
}
|
||||
digest.data = make([]byte, alg.Size)
|
||||
|
Loading…
x
Reference in New Issue
Block a user