]> git.ipfire.org Git - thirdparty/git.git/blobdiff - http-backend.c
is_ntfs_dotgit(): only verify the leading segment
[thirdparty/git.git] / http-backend.c
index 519025d2c3d944afb6fdd6ca1f3b091827a67272..5daff8ccaba3d9986e1d4073d0e142c90c01665d 100644 (file)
@@ -357,7 +357,7 @@ static void inflate_request(const char *prog_name, int out, int buffer_input)
                                die("zlib error inflating request, result %d", ret);
 
                        n = stream.total_out - cnt;
-                       if (write_in_full(out, out_buf, n) != n)
+                       if (write_in_full(out, out_buf, n) < 0)
                                die("%s aborted reading request", prog_name);
                        cnt += n;
 
@@ -378,7 +378,7 @@ static void copy_request(const char *prog_name, int out)
        ssize_t n = read_request(0, &buf);
        if (n < 0)
                die_errno("error reading request body");
-       if (write_in_full(out, buf, n) != n)
+       if (write_in_full(out, buf, n) < 0)
                die("%s aborted reading request", prog_name);
        close(out);
        free(buf);