summaryrefslogtreecommitdiff
path: root/t/t9133-git-svn-nested-git-repo.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-11-12 09:46:54 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-13 14:22:02 +0900
commit4d0984bebc5fc5662d2891ee41f7d49c32488744 (patch)
tree5421c9279a27769df112e4447ce07f1787a66409 /t/t9133-git-svn-nested-git-repo.sh
parentNinth batch for 2.20 (diff)
downloadtgif-4d0984bebc5fc5662d2891ee41f7d49c32488744.tar.xz
fsck: do not reuse child_process structs
The run-command API makes no promises about what is left in a struct child_process after a command finishes, and it's not safe to simply reuse it again for a similar command. In particular: - if you use child->args or child->env_array, they are cleared after finish_command() - likewise, start_command() may point child->argv at child->args->argv; reusing that would lead to accessing freed memory - the in/out/err may hold pipe descriptors from the previous run These two calls are _probably_ OK because they do not use any of those features. But it's only by chance, and may break in the future; let's reinitialize our struct for each program we run. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9133-git-svn-nested-git-repo.sh')
0 files changed, 0 insertions, 0 deletions