Jacek Caban : jscript: Don't copy more than needed in parse_identifier.
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 13:29:03 CDT 2011
Module: wine
Branch: master
Commit: 39f4583ef9a18515e78cc5015a37240e30eefc13
URL: http://source.winehq.org/git/wine.git/?a=commit;h=39f4583ef9a18515e78cc5015a37240e30eefc13
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Aug 5 17:23:25 2011 +0200
jscript: Don't copy more than needed in parse_identifier.
---
dlls/jscript/lex.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c
index 6dfe937..157be5b 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 */
More information about the wine-cvs
mailing list