diff --git a/utils.go b/utils.go index 632f8ed1e8d189e79c01ec6a05b08e3371d1c0e6..d401469ebbc9d05522d001d186c147472853933a 100644 --- a/utils.go +++ b/utils.go @@ -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") }