diff options
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c index 53e25f278c..18dd89b50a 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1620,6 +1620,8 @@ static int write_buffer(int fd, const void *buf, size_t len) { ssize_t size; + if (!len) + return 0; size = write_in_full(fd, buf, len); if (!size) return error("file write: disk full"); |