From 39f4583ef9a18515e78cc5015a37240e30eefc13 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 5 Aug 2011 17:23:25 +0200 Subject: [PATCH] jscript: Don't copy more than needed in parse_identifier. --- dlls/jscript/lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 6dfe9377c94..157be5ba5e3 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -337,7 +337,7 @@ static int parse_identifier(parser_ctx_t *ctx, const WCHAR **ret) len = ctx->ptr-ptr; *ret = wstr = parser_alloc(ctx, (len+1)*sizeof(WCHAR)); - memcpy(wstr, ptr, (len+1)*sizeof(WCHAR)); + memcpy(wstr, ptr, len*sizeof(WCHAR)); wstr[len] = 0; /* FIXME: unescape */