We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5fe5557 + 5ca75fd commit b782205Copy full SHA for b782205
src/curl_stream.c
@@ -121,6 +121,11 @@ static int curls_connect(git_stream *stream)
121
return seterr_curl(s);
122
}
123
124
+ if (sockextr == -1) {
125
+ giterr_set(GITERR_NET, "curl socket is no longer valid");
126
+ return -1;
127
+ }
128
+
129
s->socket = sockextr;
130
131
if (s->parent.encrypted && failed_cert)
@@ -198,6 +203,7 @@ static int wait_for(curl_socket_t fd, bool reading)
198
203
FD_ZERO(&outfd);
199
204
FD_ZERO(&errfd);
200
205
206
+ assert(fd >= 0);
201
207
FD_SET(fd, &errfd);
202
208
if (reading)
209
FD_SET(fd, &infd);
0 commit comments