summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-30 18:23:58 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-30 18:23:58 -0400
commit69e22e294ba903be420888db92440d2ae2ec48c1 (patch)
tree0877c5d8289913dce6f93030426176e7b17cf81e
parent889cfac676599f02ad2bd1abe0c9fd6ab08821b4 (diff)
downloadtor-69e22e294ba903be420888db92440d2ae2ec48c1.tar.gz
tor-69e22e294ba903be420888db92440d2ae2ec48c1.zip
Set binary mode when checking malformed descriptor.
-rw-r--r--src/or/routerparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 63397b5bce..106110e200 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -875,7 +875,7 @@ dump_desc_populate_one_file, (const char *dirname, const char *f))
* file contains a '\0', read_file_to_str() will allocate space for and
* read the entire file and return the correct size in st.
*/
- desc = read_file_to_str(path, RFTS_IGNORE_MISSING, &st);
+ desc = read_file_to_str(path, RFTS_IGNORE_MISSING|RFTS_BIN, &st);
if (!desc) {
/* We couldn't read it */
log_notice(LD_DIR,