From: Patrick Higgins <patrick.higgins@cexp.com>
To: git@vger.kernel.org
Cc: Patrick Higgins <patrick.higgins@cexp.com>
Subject: [PATCH/RFC] Bugfix for AIX tmpfile creation
Date: Mon, 23 Jun 2008 15:33:41 -0600 [thread overview]
Message-ID: <1214256821-3169-1-git-send-email-patrick.higgins@cexp.com> (raw)
The AIX mkstemp will modify it's template parameter to an empty string if
the call fails. This caused a subsequent mkdir to fail.
Signed-off-by: Patrick Higgins <patrick.higgins@cexp.com>
---
sha1_file.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index 191f814..92299ed 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2118,6 +2118,7 @@ static int create_tmpfile(char *buffer, size_t bufsiz, const char *filename)
fd = mkstemp(buffer);
if (fd < 0 && dirlen) {
/* Make sure the directory exists */
+ memcpy(buffer, filename, dirlen);
buffer[dirlen-1] = 0;
if (mkdir(buffer, 0777) || adjust_shared_perm(buffer))
return -1;
--
1.5.6.dirty
next reply other threads:[~2008-06-23 21:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 21:33 Patrick Higgins [this message]
2008-06-23 22:29 ` [PATCH/RFC] Bugfix for AIX tmpfile creation Junio C Hamano
2008-06-23 22:55 ` Linus Torvalds
2008-06-23 23:07 ` Patrick.Higgins
2008-06-23 23:14 ` Junio C Hamano
2008-06-23 23:10 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214256821-3169-1-git-send-email-patrick.higgins@cexp.com \
--to=patrick.higgins@cexp.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.