diff --git a/send-pack.c b/send-pack.c
index cd478dd82fdc08094873112b40cbf302623ecc21..512b660e99f26e391df34d48e1aebc9c6c3250e7 100644 (file)
--- a/send-pack.c
+++ b/send-pack.c
if (pipe(pipe_fd) < 0)
return error("send-pack: pipe failed");
pid = fork();
if (pipe(pipe_fd) < 0)
return error("send-pack: pipe failed");
pid = fork();
+ if (pid < 0)
+ return error("send-pack: unable to fork git-pack-objects");
if (!pid) {
/*
* The child becomes pack-objects --revs; we feed
if (!pid) {
/*
* The child becomes pack-objects --revs; we feed
char *arg = *argv;
if (*arg == '-') {
char *arg = *argv;
if (*arg == '-') {
- if (!strncmp(arg, "--receive-pack=", 15)) {
+ if (!prefixcmp(arg, "--receive-pack=")) {
receivepack = arg + 15;
continue;
}
receivepack = arg + 15;
continue;
}
- if (!strncmp(arg, "--exec=", 7)) {
+ if (!prefixcmp(arg, "--exec=")) {
receivepack = arg + 7;
continue;
}
receivepack = arg + 7;
continue;
}