fs: add length validation to fs.truncate()
This commit adds validation to the length parameter of fs.truncate(). Prior to this commit, passing a non-number would trigger a CHECK() in the binding layer. Backport-PR-URL: https://github.com/nodejs/node/pull/21171 PR-URL: https://github.com/nodejs/node/pull/20851 Fixes: https://github.com/nodejs/node/issues/20844 Reviewed-By:Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Backport-PR-URL: https://github.com/nodejs/node/pull/21171 Co-authored-by:
Shelley Vohr <shelley.vohr@gmail.com>
parent
a0cfb0c9
Please register or sign in to comment