|
|
@@ -509,7 +509,11 @@ func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs [
|
|
|
d.d.errorf("wrong extension tag. Got %b. Expecting: %v", xtag, tag)
|
|
|
return
|
|
|
}
|
|
|
- xbs = d.r.readx(l)
|
|
|
+ if d.br {
|
|
|
+ xbs = d.r.readx(l)
|
|
|
+ } else {
|
|
|
+ xbs = decByteSlice(d.r, l, d.d.h.MaxInitLen, d.d.b[:])
|
|
|
+ }
|
|
|
case simpleVdByteArray, simpleVdByteArray + 1,
|
|
|
simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4:
|
|
|
xbs = d.DecodeBytes(nil, true)
|
|
|
@@ -570,7 +574,11 @@ func (d *simpleDecDriver) DecodeNaked() {
|
|
|
n.v = valueTypeExt
|
|
|
l := d.decLen()
|
|
|
n.u = uint64(d.r.readn1())
|
|
|
- n.l = d.r.readx(l)
|
|
|
+ if d.br {
|
|
|
+ n.l = d.r.readx(l)
|
|
|
+ } else {
|
|
|
+ n.l = decByteSlice(d.r, l, d.d.h.MaxInitLen, d.d.b[:])
|
|
|
+ }
|
|
|
case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2,
|
|
|
simpleVdArray + 3, simpleVdArray + 4:
|
|
|
n.v = valueTypeArray
|