From: Junio C Hamano <junkio@cox.net>
To: Martin Waitz <tali@admingilde.org>
Cc: git@vger.kernel.org
Subject: Re: SEGV when lookup_* returns NULL
Date: Mon, 27 Nov 2006 13:55:21 -0800 [thread overview]
Message-ID: <7vu00kftbq.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20061127211315.GC18810@admingilde.org> (Martin Waitz's message of "Mon, 27 Nov 2006 22:13:15 +0100")
Martin Waitz <tali@admingilde.org> writes:
> All the lookup_{blob,tree,commit} functions check that the object
> really is of the requested type and return NULL otherwise.
> However this NULL pointer is not checked in the calling functions.
>
> Should we make lookup_* to just die when invoked on another object-type?
Making lookup_{specific type} die when they see unexpected type
would not hurt that much, I think, aside from the possibility
that some callers may check NULL to see if object already
exists, but they should be using has_sha1_file() instead.
next prev parent reply other threads:[~2006-11-27 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 21:13 SEGV when lookup_* returns NULL Martin Waitz
2006-11-27 21:55 ` Junio C Hamano [this message]
2006-11-27 23:33 ` Johannes Schindelin
2006-11-28 0:13 ` Junio C Hamano
2006-11-28 2:23 ` Morten Welinder
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=7vu00kftbq.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=tali@admingilde.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.