diff options
author | Jan Andres <jandres@gmx.net> | 2005-11-29 03:51:54 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-29 08:56:30 +0300 |
commit | 3e2f62bebfe8e9aeea63849c37c65f25ea001e65 (patch) | |
tree | e2048858b5e096a2e3608bac59fed070e8db833b | |
parent | f2e6f1c9763f65918211ed28caf77a40effa4e7e (diff) |
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.c | 2 |
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); } } |