mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
SWS: use of uninitialized memory fix
I made "connmon" not get initialized properly before use, and I use the big hammer and make sure we always clear the entire struct to avoid any problem like this in the future.
This commit is contained in:
parent
1dcf4418ba
commit
d759a70db8
@ -1440,6 +1440,7 @@ static void http_connect(curl_socket_t *infdp,
|
|||||||
if(datafd != CURL_SOCKET_BAD) {
|
if(datafd != CURL_SOCKET_BAD) {
|
||||||
struct httprequest req2;
|
struct httprequest req2;
|
||||||
int err;
|
int err;
|
||||||
|
memset(&req2, 0, sizeof(req2));
|
||||||
logmsg("====> Client connect DATA");
|
logmsg("====> Client connect DATA");
|
||||||
#ifdef TCP_NODELAY
|
#ifdef TCP_NODELAY
|
||||||
/* Disable the Nagle algorithm */
|
/* Disable the Nagle algorithm */
|
||||||
@ -1699,6 +1700,8 @@ int main(int argc, char *argv[])
|
|||||||
bool use_fork = FALSE;
|
bool use_fork = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
memset(&req, 0, sizeof(req));
|
||||||
|
|
||||||
while(argc>arg) {
|
while(argc>arg) {
|
||||||
if(!strcmp("--version", argv[arg])) {
|
if(!strcmp("--version", argv[arg])) {
|
||||||
printf("sws IPv4%s"
|
printf("sws IPv4%s"
|
||||||
|
Loading…
Reference in New Issue
Block a user