提交 3e2f62be 编写于 作者: J Jan Andres 提交者: Junio C Hamano

Fix typo in http-push.c

Typo resulted in accessing past the beginning of a string causing segfaults.

[jc: signoffs?]
上级 f2e6f1c9
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册