]> git.ipfire.org Git - thirdparty/git.git/blobdiff - send-pack.c
Sync with 2.16.6
[thirdparty/git.git] / send-pack.c
index 2112d3b27ad21e1d457b08a3aa71a811b5e8ee79..8d9190f5e7815c6b2f18afd266643a8c862e526e 100644 (file)
@@ -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"))