summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Andres <jandres@gmx.net>2005-11-29 00:51:54 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-29 05:56:30 (GMT)
commit3e2f62bebfe8e9aeea63849c37c65f25ea001e65 (patch)
treee2048858b5e096a2e3608bac59fed070e8db833b
parentf2e6f1c9763f65918211ed28caf77a40effa4e7e (diff)
downloadgit-3e2f62bebfe8e9aeea63849c37c65f25ea001e65.zip
git-3e2f62bebfe8e9aeea63849c37c65f25ea001e65.tar.gz
git-3e2f62bebfe8e9aeea63849c37c65f25ea001e65.tar.bz2
Fix typo in http-push.c
Typo resulted in accessing past the beginning of a string causing segfaults. [jc: signoffs?]
-rw-r--r--http-push.c2
1 files changed, 1 insertions, 1 deletions
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 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);
}
}