diff options
author | Jim Meyering <meyering@redhat.com> | 2009-09-12 10:43:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-13 01:32:20 -0700 |
commit | 41698375ada57d51cf6db5cf25970ccd1b918180 (patch) | |
tree | a1ed2b0f32a829bdb0b4cece3d85df933b924962 /bundle.c | |
parent | 3d913526b19545eb4e463f96d2f3b8db8daae6ef (diff) | |
download | git-41698375ada57d51cf6db5cf25970ccd1b918180.tar.gz |
don't dereference NULL upon fdopen failure
There were several unchecked use of fdopen(); replace them with xfdopen()
that checks and dies.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.c')
-rw-r--r-- | bundle.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -234,7 +234,7 @@ int create_bundle(struct bundle_header *header, const char *path, rls.git_cmd = 1; if (start_command(&rls)) return -1; - rls_fout = fdopen(rls.out, "r"); + rls_fout = xfdopen(rls.out, "r"); while (fgets(buffer, sizeof(buffer), rls_fout)) { unsigned char sha1[20]; if (buffer[0] == '-') { |