ensure correct size of internal buffers in case of error
ensure correct size of internal buffers in case of error

Cyan4973/zstd,Cyan4973/zstd,Cyan4973/zstd,Cyan4973/zstd,Majlen/zstd,Majlen/zstd,Majlen/zstd,Majlen/zstd,Cyan4973/zstd