[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 158/178: setup_transfer: deal with both sockets bei
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 158/178: setup_transfer: deal with both sockets being -1 |
Date: |
Wed, 23 May 2018 12:26:33 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit fe6b78b42dee1d33a2a225de6e42d0d922d4fe10
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri May 11 23:54:26 2018 +0200
setup_transfer: deal with both sockets being -1
Detected by Coverity; CID 1435559. Follow-up to f8d608f38d00. It would
index the array with -1 if neither index was a socket.
---
lib/transfer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/transfer.c b/lib/transfer.c
index 6bf95c576..131f2dc7c 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2021,7 +2021,8 @@ Curl_setup_transfer(
if(conn->bits.multiplex || conn->httpversion == 20) {
/* when multiplexing, the read/write sockets need to be the same! */
conn->sockfd = sockindex == -1 ?
- conn->sock[writesockindex] : conn->sock[sockindex];
+ ((writesockindex == -1 ? CURL_SOCKET_BAD : conn->sock[writesockindex])) :
+ conn->sock[sockindex];
conn->writesockfd = conn->sockfd;
}
else {
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 168/178: tool: Fix format specifiers, (continued)
- [GNUnet-SVN] [gnurl] 168/178: tool: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 175/178: docs/libcurl/index.html: removed, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 164/178: contributors.sh: use "on github", not at, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 163/178: http2: getsock fix for uploads, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 162/178: pingpong: fix response cache memcpy overflow, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 172/178: gcc: disable picky gcc-8 function pointer warnings in two places, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 173/178: http2: use easy handle of stream for logging, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 135/178: CURLOPT_URL.3: add ENCODING section [ci skip], gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 165/178: lib: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 169/178: examples: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 158/178: setup_transfer: deal with both sockets being -1,
gnunet <=
- [GNUnet-SVN] [gnurl] 178/178: Merge tag 'curl-7_60_0' (with fixes), gnunet, 2018/05/23