From 69afb0985dd8cb877326fea613adcdc83c9906bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Tue, 23 Aug 2011 11:57:50 +0200 Subject: [PATCH] jscript: Don't copy more than needed in parse_string_literal. --- 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 157be5ba5e3..dcdb3f37e19 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -361,7 +361,7 @@ static int parse_string_literal(parser_ctx_t *ctx, const WCHAR **ret, WCHAR endc 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; ctx->ptr++;