Piotr Caban : msvcrt: Fixed buffer overflow in snprintf functions family.

Alexandre Julliard julliard at winehq.org
Mon Jun 6 15:19:10 CDT 2011


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Jun  6 14:02:30 2011 +0200

msvcrt: Fixed buffer overflow in snprintf functions family.

Spotted by Andrew Miller.

---

 dlls/msvcrt/printf.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h
index a69e8f8..eefecd1 100644
--- a/dlls/msvcrt/printf.h
+++ b/dlls/msvcrt/printf.h
@@ -56,6 +56,7 @@ static int FUNC_NAME(puts_clbk_str)(void *ctx, int len, const APICHAR *str)
 
     memcpy(out->buf, str, len*sizeof(APICHAR));
     out->buf += len;
+    out->len -= len;
     return len;
 }
 




More information about the wine-cvs mailing list