diff options
author | Linus Torvalds <torvalds@osdl.org> | 2006-11-16 22:57:20 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-11-16 23:45:57 -0800 |
commit | 6b1f8c32b1a602734f14b9cf8a9f59a767752677 (patch) | |
tree | 94da67b1ece907d6d3838c24a06686431d0fdca8 /builtin-for-each-ref.c | |
parent | d09e79cb1c474b3bb323356e6d1072922ab7ccb2 (diff) | |
download | git-6b1f8c32b1a602734f14b9cf8a9f59a767752677.tar.gz |
"git fmt-merge-msg" SIGSEGV
Ok, this is a _really_ stupid case, and I don't think it matters, but hey,
we should never SIGSEGV.
Steps to reproduce:
mkdir duh
cd duh
git init-db
git-fmt-merge-msg < /dev/null
will cause a SIGSEGV in cmd_fmt_merge_msg(), because we're doing a
strncmp() with a NULL current_branch.
And yeah, it's an insane schenario, and no, it doesn't really matter. The
only reason I noticed was that a broken version of my "git pull" into an
empty directory would cause this.
This silly patch just replaces the SIGSEGV with a controlled exit with an
error message.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-for-each-ref.c')
0 files changed, 0 insertions, 0 deletions