diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-27 23:53:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-27 23:53:03 -0400 |
commit | bfe783f167d4d88123117a460cde652707bdb2ef (patch) | |
tree | 60acd9ed42f7e51cdc3d84d51c8caba1fe3ff6df /src/or/routerparse.c | |
parent | a83abcf5ee5cb8fe245bc97e089e082f62921194 (diff) | |
download | tor-bfe783f167d4d88123117a460cde652707bdb2ef.tar.gz tor-bfe783f167d4d88123117a460cde652707bdb2ef.zip |
Make dump_desc() use binary mode
Otherwise, it could mung the thing that came over the net on windows,
which would defeat the purpose of recording the unparseable thing.
Fixes bug 11342; bugfix on 0.2.2.1-alpha.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 3aa4bdf8a5..d52a98259f 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -598,7 +598,7 @@ dump_desc(const char *desc, const char *type) char *content = tor_malloc_zero(filelen); tor_snprintf(content, filelen, "Unable to parse descriptor of type " "%s:\n%s", type, desc); - write_str_to_file(debugfile, content, 0); + write_str_to_file(debugfile, content, 1); log_info(LD_DIR, "Unable to parse descriptor of type %s. See file " "unparseable-desc in data directory for details.", type); tor_free(content); |