From: Linus Torvalds <torvalds@osdl.org>
To: Git Mailing List <git@vger.kernel.org>
Subject: Still unsafe: write_sha1_from_fd()
Date: Thu, 6 Oct 2005 15:26:52 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0510061520400.31407@g5.osdl.org> (raw)
I was looking over the object writing functions, and noticed that
"write_sha1_from_fd()" writes its object directly into the final object
name, which means that if it is interrupted with ^C at an inopportune
time, it will leave a corrupt object behind.
The only user is apparently ssh-fetch, but especially since the input-fd
is a network connection, it looks like it is not at all unlikely that this
case will trigger - all it takes is somebody impatient waiting for a large
object.
Ugh,
Linus
next reply other threads:[~2005-10-06 22:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-06 22:26 Linus Torvalds [this message]
2005-10-06 22:37 ` Still unsafe: write_sha1_from_fd() 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=Pine.LNX.4.64.0510061520400.31407@g5.osdl.org \
--to=torvalds@osdl.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox