Skip to content

Commit dde7b70

Browse files
committed
Error instead of triggering a segfault in git archive --remote=""
Signed-off-by: Emily C <emilyyyylime+git@gmail.com>
1 parent f93ff17 commit dde7b70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: builtin/archive.c

+5
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ int cmd_archive(int argc,
9797
argc = parse_options(argc, argv, prefix, local_opts, NULL,
9898
PARSE_OPT_KEEP_ALL);
9999

100+
if (remote && !remote[0]) {
101+
error(N_("Option `remote' may not be left empty"));
102+
exit(129);
103+
}
104+
100105
init_archivers();
101106

102107
if (output)

0 commit comments

Comments
 (0)