Jacek Caban : wininet/tests: Fixed potential buffer overflow (coverity).

Alexandre Julliard julliard at winehq.org
Wed Jun 14 15:44:58 CDT 2017


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jun 14 11:43:51 2017 +0200

wininet/tests: Fixed potential buffer overflow (coverity).

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wininet/tests/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 8bb925f..a3a0980 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -5212,7 +5212,7 @@ static void test_redirect(int port)
                        "Content-Length: 0\r\n"
                        "\r\n");
 
-    size = server_read_data(buf, sizeof(buf));
+    size = server_read_data(buf, sizeof(buf) - 1);
     buf[size] = 0;
     p = strstr(buf, "\r\n");
     if(p) *p = 0;




More information about the wine-cvs mailing list