diff options
Diffstat (limited to 'ber.go')
-rw-r--r-- | ber.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -235,6 +235,10 @@ func ReadPacket(reader io.Reader) (*Packet, error) { } } + if datalen > 1024*1024*16 { + return nil, err + } + buf = resizeBuffer(buf, idx+datalen) err = readBytes(reader, buf[idx:]) |