[tor-commits] [tor/master] Set binary mode when checking malformed descriptor.

nickm at torproject.org nickm at torproject.org
Thu Jun 30 22:24:02 UTC 2016


commit 69e22e294ba903be420888db92440d2ae2ec48c1
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Jun 30 18:23:58 2016 -0400

    Set binary mode when checking malformed descriptor.
---
 src/or/routerparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 63397b5..106110e 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,



More information about the tor-commits mailing list