[PATCH] Fix typo in http-push.c
- From
- Jan Andres <jandres@gmx.net>
- Date
- Nov 29, 2005, 00:51 UTC
- Message-ID
- <20051129005154.GA3076@pitr.home.jan>
Hi guys,
Please find below the patch for a typo in http-push.c (in the maint branch), which caused git-http-push to segfault on my Linux i386 box.
Regards, Jan
diff --git a/http-push.c b/http-push.c index 76c7886..ad78982 100644 --- a/http-push.c +++ b/http-push.c @@ -784,7 +784,7 @@ static void handle_new_lock_ctx(struct x strtol(ctx->cdata + 7, NULL, 10); } else if (!strcmp(ctx->name, DAV_ACTIVELOCK_TOKEN)) { if (!strncmp(ctx->cdata, "opaquelocktoken:", 16)) { - lock->token = xmalloc(strlen(ctx->cdata - 15)); + lock->token = xmalloc(strlen(ctx->cdata) - 15); strcpy(lock->token, ctx->cdata + 16); } }
-- Jan Andres <jandres@gmx.net>