Max Kellermann : msvcrt: Fix character/ byte confusion in buffer overflow branch.

Alexandre Julliard julliard at winehq.org
Tue May 7 15:54:04 CDT 2013


Module: wine
Branch: master
Commit: cee65e94094afcadac996473ff5f98beea2f7aac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cee65e94094afcadac996473ff5f98beea2f7aac

Author: Max Kellermann <max at 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;




More information about the wine-cvs mailing list