]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Set binary mode when checking malformed descriptor.
authorNick Mathewson <nickm@torproject.org>
Thu, 30 Jun 2016 22:23:58 +0000 (18:23 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 30 Jun 2016 22:23:58 +0000 (18:23 -0400)
src/or/routerparse.c

index 63397b5bce27d543077c1370011694ef675734b5..106110e200b76d9ddb28dfc6f29959c102991641 100644 (file)
@@ -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,