summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index 2112d3b27a..8d9190f5e7 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -137,6 +137,8 @@ static int pack_objects(int fd, struct ref *refs, struct oid_array *extra, struc
static int receive_unpack_status(int in)
{
const char *line = packet_read_line(in, NULL);
+ if (!line)
+ return error(_("unexpected flush packet while reading remote unpack status"));
if (!skip_prefix(line, "unpack ", &line))
return error(_("unable to parse remote unpack status: %s"), line);
if (strcmp(line, "ok"))