From: Jeff King <peff@peff.net>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning
Date: Tue, 26 Mar 2013 15:38:05 -0400 [thread overview]
Message-ID: <20130326193805.GA28880@sigill.intra.peff.net> (raw)
In-Reply-To: <20130326193539.GB28244@sigill.intra.peff.net>
On Tue, Mar 26, 2013 at 03:35:39PM -0400, Jeff King wrote:
> I note that we do not actually check that contents != NULL after calling
> read_sha1_file, either (nor that sha1_object_info does not return an
> error). I suspect cat-file could segfault under the right conditions.
Oh nevermind, we do. We just do it by checking that "type" was filled in
correctly, which can combine the check for both read_sha1_file and
sha1_object_info. Sorry for the noise.
-Peff
next prev parent reply other threads:[~2013-03-26 19:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 19:20 [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning Ramsay Jones
2013-03-26 19:35 ` Jeff King
2013-03-26 19:38 ` Jeff King [this message]
2013-03-28 18:48 ` Ramsay Jones
2013-03-28 19:02 ` Jeff King
2013-03-28 19:36 ` Jonathan Nieder
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=20130326193805.GA28880@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ramsay@ramsay1.demon.co.uk \
/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;
as well as URLs for NNTP newsgroup(s).