mirror of
https://github.com/git/git.git
synced 2024-11-27 20:14:30 +08:00
Fix typo in http-push.c
Typo resulted in accessing past the beginning of a string causing segfaults. [jc: signoffs?]
This commit is contained in:
parent
f2e6f1c976
commit
3e2f62bebf
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user