Commit eb8a51a3 authored by kohta ito's avatar kohta ito Committed by Sam Roberts
Browse files

child_process: use non-infinite maxBuffer defaults

Set the default maxBuffer size to 204,800 bytes for execSync,
execFileSync, and spawnSync.

APIs that return the child output as a string should have non-infinite
defaults for maxBuffer sizes to avoid out-of-memory error conditions. A
non-infinite default used to be the documented behaviour for all
relevant APIs, but the implemented behaviour for execSync, execFileSync
and spawnSync was to have no maxBuffer limits.

PR-URL: https://github.com/nodejs/node/pull/23027
Refs: https://github.com/nodejs/node/pull/22894


Reviewed-By: default avatarSam Roberts <vieuxtech@gmail.com>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
parent 1656cd2e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment