Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
cc5966b0
Commit
cc5966b0
authored
Nov 14, 2016
by
Carlos Martín Nieto
Committed by
GitHub
Nov 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3983 from pks-t/pks/smart-early-eof
transports: smart: abort on early end of stream
parents
eb71490a
62494bf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
include/git2/proxy.h
+1
-1
src/transports/smart_protocol.c
+6
-2
No files found.
include/git2/proxy.h
View file @
cc5966b0
...
...
@@ -19,7 +19,7 @@ typedef enum {
/**
* Do not attempt to connect through a proxy
*
* If built against l
bi
curl, it itself may attempt to connect
* If built against l
ib
curl, it itself may attempt to connect
* to a proxy if the environment variables specify it.
*/
GIT_PROXY_NONE
,
...
...
src/transports/smart_protocol.c
View file @
cc5966b0
...
...
@@ -50,7 +50,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
if
((
recvd
=
gitno_recv
(
buf
))
<
0
)
return
recvd
;
if
(
recvd
==
0
&&
!
flush
)
{
if
(
recvd
==
0
)
{
giterr_set
(
GITERR_NET
,
"early EOF"
);
return
GIT_EEOF
;
}
...
...
@@ -222,8 +222,12 @@ static int recv_pkt(git_pkt **out, gitno_buffer *buf)
if
(
error
<
0
&&
error
!=
GIT_EBUFS
)
return
error
;
if
((
ret
=
gitno_recv
(
buf
))
<
0
)
if
((
ret
=
gitno_recv
(
buf
))
<
0
)
{
return
ret
;
}
else
if
(
ret
==
0
)
{
giterr_set
(
GITERR_NET
,
"early EOF"
);
return
GIT_EEOF
;
}
}
while
(
error
);
gitno_consume
(
buf
,
line_end
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment