aboutsummaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-03-22 23:53:52 -0400
committerJunio C Hamano <gitster@pobox.com>2015-03-22 21:39:14 -0700
commit5c950e9bf098b17bb37e06f7c9f50d24e9d2904f (patch)
tree5ce551fa90856f8d6c9b435ba778a1a10b8afdc2 /blob.c
parent911ec99b688fc4d5673a0fc8984b22ff2251e490 (diff)
downloadgit-5c950e9bf098b17bb37e06f7c9f50d24e9d2904f.tar.gz
git-5c950e9bf098b17bb37e06f7c9f50d24e9d2904f.tar.xz
wt-status: use capture_command
When we spawn "git submodule status" to read its output, we use run_command() followed by strbuf_read() read from the pipe. This can deadlock if the subprocess output is larger than the system pipe buffer. Furthermore, if start_command() fails, we'll try to read from a bogus descriptor (probably "-1" or a descriptor we just closed, but it is a bad idea for us to make assumptions about how start_command implements its error handling). And if start_command succeeds, we leak the file descriptor for the pipe to the child. All of these can be solved by using the capture_command helper. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blob.c')
0 files changed, 0 insertions, 0 deletions