Fix potential infinite loop when unpacking zstd (from jgrpp)

This commit is contained in:
dP
2025-12-18 04:14:11 +05:00
parent e37e11c3cd
commit 2aaf60b38d

View File

@@ -2829,6 +2829,7 @@ struct ZSTDLoadFilter : LoadFilter {
if (this->input.pos == this->input.size) {
this->input.size = this->chain->Read(this->fread_buf, sizeof(this->fread_buf));
this->input.pos = 0;
if (this->input.size == 0) break;
}
size_t ret = ZSTD_decompressStream(this->zstd, &output, &this->input);