projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25c4f61
)
Fix builtin checkout crashing when given an invalid path
author
Alex Riesen
<raa.lkml@gmail.com>
Thu, 28 Feb 2008 16:30:47 +0000
(17:30 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 29 Feb 2008 08:00:29 +0000
(
00:00
-0800)
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-checkout.c
patch
|
blob
|
history
diff --git
a/builtin-checkout.c
b/builtin-checkout.c
index 4a4bb8b77dc9251849a2ecf625a4efb9ce154fdb..9579ff4ab12dfc1c48d6e530a93d0d18e07c2ebb 100644
(file)
--- a/
builtin-checkout.c
+++ b/
builtin-checkout.c
@@
-545,6
+545,10
@@
int cmd_checkout(int argc, const char **argv, const char *prefix)
if (argc) {
const char **pathspec = get_pathspec(prefix, argv);
+
+ if (!pathspec)
+ die("invalid path specification");
+
/* Checkout paths */
if (opts.new_branch || opts.force || opts.merge) {
if (argc == 1) {