From cee65e94094afcadac996473ff5f98beea2f7aac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 6 May 2013 22:21:03 +0200 Subject: [PATCH] msvcrt: Fix character/byte confusion in buffer overflow branch. --- dlls/msvcrt/printf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h index 3ccb1c49eef..0fe27f71c57 100644 --- a/dlls/msvcrt/printf.h +++ b/dlls/msvcrt/printf.h @@ -48,7 +48,7 @@ static int FUNC_NAME(puts_clbk_str)(void *ctx, int len, const APICHAR *str) return len; if(out->len < len) { - memcpy(out->buf, str, out->len); + memcpy(out->buf, str, out->len*sizeof(APICHAR)); out->buf += out->len; out->len = 0; return -1;