Max Kellermann : msvcrt: Fix character/ byte confusion in buffer overflow branch.
Module: wine Branch: master Commit: cee65e94094afcadac996473ff5f98beea2f7aac URL: http://source.winehq.org/git/wine.git/?a=commit;h=cee65e94094afcadac996473ff... Author: Max Kellermann <max(a)duempel.org> Date: Mon May 6 22:21:03 2013 +0200 msvcrt: Fix character/byte confusion in buffer overflow branch. --- dlls/msvcrt/printf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h index 3ccb1c4..0fe27f7 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;
participants (1)
-
Alexandre Julliard