remko / go-mkvparse

Fast Matroska parser in Go
MIT License
34 stars 11 forks source link

Avoid panic for bogus element sizes (fixes #4) #5

Closed derat closed 4 years ago

derat commented 4 years ago

Read element data into a byte.Buffer instead of initially allocating a slice for its full size. This avoids a panic when encountering an incorrect large size in an element (which can be triggered by attempting to parse non-MKV data).