Marcus Meissner : wininet/tests: Avoid overflowing the buffer (Coverity).
Module: wine Branch: master Commit: 4c20fec04555a1a3053e7414e339fcc67bff9338 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c20fec04555a1a3053e7414e3... Author: Marcus Meissner <marcus(a)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;
participants (1)
-
Alexandre Julliard