mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
- David McCreedy fixed a bad call to getsockname() that wrongly used a size_t
variable to point to when it should be a socklen_t.
This commit is contained in:
parent
b2f8de571f
commit
ebee2e323d
3
CHANGES
3
CHANGES
@ -7,6 +7,9 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
Daniel (22 December 2006)
|
Daniel (22 December 2006)
|
||||||
|
- David McCreedy fixed a bad call to getsockname() that wrongly used a size_t
|
||||||
|
variable to point to when it should be a socklen_t.
|
||||||
|
|
||||||
- When setting a proxy with environment variables and (for example) running
|
- When setting a proxy with environment variables and (for example) running
|
||||||
'curl [URL]' with a URL without a protocol prefix, curl would not send a
|
'curl [URL]' with a URL without a protocol prefix, curl would not send a
|
||||||
correct request as it failed to add the protocol prefix.
|
correct request as it failed to add the protocol prefix.
|
||||||
|
@ -384,11 +384,10 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
if( bind(sockfd, sock, socksize) >= 0) {
|
if( bind(sockfd, sock, socksize) >= 0) {
|
||||||
/* we succeeded to bind */
|
/* we succeeded to bind */
|
||||||
struct Curl_sockaddr_storage add;
|
struct Curl_sockaddr_storage add;
|
||||||
size_t size;
|
socklen_t size;
|
||||||
|
|
||||||
size = sizeof(add);
|
size = sizeof(add);
|
||||||
if(getsockname(sockfd, (struct sockaddr *) &add,
|
if(getsockname(sockfd, (struct sockaddr *) &add, &size) < 0) {
|
||||||
(socklen_t *)&size)<0) {
|
|
||||||
failf(data, "getsockname() failed");
|
failf(data, "getsockname() failed");
|
||||||
return CURLE_HTTP_PORT_FAILED;
|
return CURLE_HTTP_PORT_FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user