You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior? Why is that the expected behavior?
pledgedSrcSize represents the expected exact byte length of the uncompressed input. However, the current Zstd binding does not strictly validate this option.Non-number values are silently treated as if the option was omitted, while IntegerValue() implicitly converts values such as fractional numbers and NaN.
Only undefined or a non-negative safe integer should be accepted.
Non-number values should throw ERR_INVALID_ARG_TYPE.
NaN, Infinity, fractional numbers, negative numbers, and unsafe integers should throw ERR_OUT_OF_RANGE.
Invalid options should be rejected during argument validation rather than producing a later ZSTD_error_srcSize_wrong.
Values above Number.MAX_SAFE_INTEGER should not be accepted because JavaScript cannot represent every integer in that range precisely, while the pledged size represents an exact byte count.
Activity
zlib: validate pledgedSrcSize as a safe integer
zlib: validate pledgedSrcSize as a safe integer
zlib: validate pledgedSrcSize as a safe integer
zlib: validate pledgedSrcSize as a safe integer