Module: wine Branch: refs/heads/master Commit: 21712d3d156740b18f2d9489ec819fbda41b3b13 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=21712d3d156740b18f2d9489...
Author: Aric Stewart aric@codeweavers.com Date: Fri Jan 13 13:52:38 2006 +0100
wininet: Handle NULL lpBuffersIn in HttpSendRequestExW.
---
dlls/wininet/http.c | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index ee78f24..1312380 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1788,15 +1788,27 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET workRequest.asyncall = HTTPSENDREQUESTW; workRequest.hdr = WININET_AddRef( &lpwhr->hdr ); req = &workRequest.u.HttpSendRequestW; - if (lpBuffersIn->lpcszHeader) - /* FIXME: this should use dwHeadersLength or may not be necessary at all */ - req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader); + if (lpBuffersIn) + { + if (lpBuffersIn->lpcszHeader) + /* FIXME: this should use dwHeadersLength or may not be necessary at all */ + req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader); + else + req->lpszHeader = NULL; + req->dwHeaderLength = lpBuffersIn->dwHeadersLength; + req->lpOptional = lpBuffersIn->lpvBuffer; + req->dwOptionalLength = lpBuffersIn->dwBufferLength; + req->dwContentLength = lpBuffersIn->dwBufferTotal; + } else + { req->lpszHeader = NULL; - req->dwHeaderLength = lpBuffersIn->dwHeadersLength; - req->lpOptional = lpBuffersIn->lpvBuffer; - req->dwOptionalLength = lpBuffersIn->dwBufferLength; - req->dwContentLength = lpBuffersIn->dwBufferTotal; + req->dwHeaderLength = 0; + req->lpOptional = NULL; + req->dwOptionalLength = 0; + req->dwContentLength = 0; + } + req->bEndRequest = FALSE;
INTERNET_AsyncCall(&workRequest);