On Wed, Jun 18, 2008 at 12:32:05AM -0700, Junio C Hamano wrote:I sent out a code cleanup for remote.c yesterday that fixes a segfault: http://mid.gmane.org/20080616161502.GA7219@sigill.intra.peff.net I am OK if it doesn't make it in to 1.5.6, but if not, then we should at least apply the very safe one-liner that prevents the segfault. That patch is below. -- >8 -- fix segfault with "git push bogus:bogus" We try to guess the type of the dst half of the refspec based on the src half. If the src half is bogus, we ended up dereferencing NULL. --- remote.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/remote.c b/remote.c index 91e3b11..fd8c71a 100644 --- a/remote.c +++ b/remote.c @@ -920,7 +920,8 @@ static int match_explicit(struct ref *src, struct ref *dst, case 0: if (!memcmp(dst_value, "refs/", 5)) matched_dst = make_linked_ref(dst_value, dst_tail); - else if((dst_guess = guess_ref(dst_value, matched_src))) + else if(matched_src && + (dst_guess = guess_ref(dst_value, matched_src))) matched_dst = make_linked_ref(dst_guess, dst_tail); else error("unable to push to unqualified destination: %s\n" -- 1.5.6.rc3.160.g2a3c9 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Ingo Molnar | Re: [RFT] x86 acpi: normalize segment descriptor register on resume |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Ingo Molnar | [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
