On Wed, Jun 18, 2008 at 12:32:05AM -0700, Junio C Hamano wrote: > I am sending this out just as the final minute preview before 1.5.6 final, > hopefully tomorrow night. I sent out a code cleanup for remote.c yesterday that fixes a segfault: http://mid.gmane.org/20080616161502.GA7219@xxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html