Marcus Meissner : wininet/tests: Avoid overflowing the buffer (Coverity).
Alexandre Julliard
julliard at winehq.org
Tue May 28 15:16:59 CDT 2013
Module: wine
Branch: master
Commit: 4c20fec04555a1a3053e7414e339fcc67bff9338
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c20fec04555a1a3053e7414e339fcc67bff9338
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sun May 26 14:40:12 2013 +0200
wininet/tests: Avoid overflowing the buffer (Coverity).
---
dlls/wininet/tests/http.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 60fbe57..b42e732 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -613,7 +613,7 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
res = InternetQueryOptionA(hor,INTERNET_OPTION_URL,buffer,&length);
ok(res, "InternetQueryOptionA(INTERNET_OPTION_URL) failed with error %d\n", GetLastError());
- length = sizeof(buffer);
+ length = sizeof(buffer)-1;
res = HttpQueryInfoA(hor,HTTP_QUERY_RAW_HEADERS,buffer,&length,0x0);
ok(res, "HttpQueryInfoA(HTTP_QUERY_RAW_HEADERS) failed with error %d\n", GetLastError());
buffer[length]=0;
More information about the wine-cvs
mailing list