diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-23 09:57:14 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-23 09:57:14 -0400 |
commit | a0398dd3486b5e489b8e6db7490b9c24337161b0 (patch) | |
tree | cd62ccaa6c7d3e73fcfc05a18fe24ff488230a51 /src | |
parent | ff65618f16a1ae01b0d8267fa658b214581af524 (diff) | |
parent | 4f19f85eda9fa096fcca2b8ce34b1db0b757d4a7 (diff) | |
download | tor-a0398dd3486b5e489b8e6db7490b9c24337161b0.tar.gz tor-a0398dd3486b5e489b8e6db7490b9c24337161b0.zip |
Merge remote-tracking branch 'jigsaw/fix-17758'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/microdesc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 130259a29f..a81dc54628 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -108,6 +108,7 @@ dump_microdescriptor(int fd, microdesc_t *md, size_t *annotation_len_out) md->off = tor_fd_getpos(fd); written = write_all(fd, md->body, md->bodylen, 0); if (written != (ssize_t)md->bodylen) { + written = written < 0 ? 0 : written; log_warn(LD_DIR, "Couldn't dump microdescriptor (wrote %ld out of %lu): %s", (long)written, (unsigned long)md->bodylen, |