diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-09 01:09:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-09 01:09:07 +0100 |
commit | 56a57652ef8e4ca2f108a8719b8caeed5e153c95 (patch) | |
tree | d8569b5c8e1b6e276a0434fb7cfb82d210e289b1 /run-command.c | |
parent | Merge branch 'jt/transfer-fsck-across-packs-fix' (diff) | |
parent | Git 2.30.2 (diff) | |
download | git-56a57652ef8e4ca2f108a8719b8caeed5e153c95.tar.xz git-56a57652ef8e4ca2f108a8719b8caeed5e153c95.zip |
Sync with Git 2.30.2 for CVE-2021-21300
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c index 509841bf27..4e34623e2e 100644 --- a/run-command.c +++ b/run-command.c @@ -993,6 +993,7 @@ int finish_command(struct child_process *cmd) int ret = wait_or_whine(cmd->pid, cmd->argv[0], 0); trace2_child_exit(cmd, ret); child_process_clear(cmd); + invalidate_lstat_cache(); return ret; } @@ -1294,13 +1295,19 @@ error: int finish_async(struct async *async) { #ifdef NO_PTHREADS - return wait_or_whine(async->pid, "child process", 0); + int ret = wait_or_whine(async->pid, "child process", 0); + + invalidate_lstat_cache(); + + return ret; #else void *ret = (void *)(intptr_t)(-1); if (pthread_join(async->tid, &ret)) error("pthread_join failed"); + invalidate_lstat_cache(); return (int)(intptr_t)ret; + #endif } |