summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorJan Andres <jandres@gmx.net>2005-11-29 01:51:54 +0100
committerJunio C Hamano <junkio@cox.net>2005-11-28 21:56:30 -0800
commit3e2f62bebfe8e9aeea63849c37c65f25ea001e65 (patch)
treee2048858b5e096a2e3608bac59fed070e8db833b /http-push.c
parentf2e6f1c9763f65918211ed28caf77a40effa4e7e (diff)
downloadgit-3e2f62bebfe8e9aeea63849c37c65f25ea001e65.tar.gz
Fix typo in http-push.c
Typo resulted in accessing past the beginning of a string causing segfaults. [jc: signoffs?]
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/http-push.c b/http-push.c
index 76c788673e..ad789829c1 100644
--- a/http-push.c
+++ b/http-push.c
@@ -784,7 +784,7 @@ static void handle_new_lock_ctx(struct xml_ctx *ctx, int tag_closed)
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);
}
}