Commit 9bb3ea42 authored by Lucas Molas's avatar Lucas Molas

fix: enforce maxlen in ReadByteArray()

parent c568d328
......@@ -470,7 +470,7 @@ func ReadByteArray(br io.Reader, maxlen uint64) ([]byte, error) {
return nil, fmt.Errorf("expected cbor type 'byte string' in input")
}
if extra > 256*1024 {
if extra > maxlen {
return nil, fmt.Errorf("string in cbor input too long")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment