ebml-go
ebml-go copied to clipboard
panic with `SizeUnknown` used for creating a byte array
Running ebml-go I get this error:
panic: runtime error: makeslice: len out of range
This panic happens when the byte array is created here: https://github.com/at-wat/ebml-go/blob/master/value.go#L207
Looks the issue is related to this area of the code: https://github.com/at-wat/ebml-go/blob/master/value.go#L73
SizeUnknown is set to a large number 0xffffffffffffff
that causes panic under certain conditions. I'm running this on mac os darwin which can potentially play a role. I wonder if a smaller number might be more reasonable.
SizeUnknown = 0xffffffffffffff
https://github.com/at-wat/ebml-go/blob/ee4c93ced04df56f069a8bcbf0491659a403aa6a/value.go#L31