Backport fix from commit 125d817
Backport fix from commit 125d817

This fixes a read of unitialized memory.
Full commit hash: 125d81774fe87a2bc18023d999d8e510678c38fb.

ds77/zstd,Cyan4973/zstd,Majlen/zstd,ds77/zstd,inikep/zstd,Majlen/zstd,Cyan4973/zstd,inikep/zstd,Majlen/zstd,inikep/zstd,inikep/zstd,Cyan4973/zstd,Cyan4973/zstd,ds77/zstd,Cyan4973/zstd,ds77/zstd,Majlen/zstd