mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
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.
This commit is contained in:
parent
a83abcf5ee
commit
bfe783f167
4
changes/bug11342
Normal file
4
changes/bug11342
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- When dumping a malformed directory object to disk, save it in binary
|
||||||
|
mode on windows, not text mode. Fixes bug 11342; bugfix on
|
||||||
|
0.2.2.1-alpha.
|
@ -598,7 +598,7 @@ dump_desc(const char *desc, const char *type)
|
|||||||
char *content = tor_malloc_zero(filelen);
|
char *content = tor_malloc_zero(filelen);
|
||||||
tor_snprintf(content, filelen, "Unable to parse descriptor of type "
|
tor_snprintf(content, filelen, "Unable to parse descriptor of type "
|
||||||
"%s:\n%s", type, desc);
|
"%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 "
|
log_info(LD_DIR, "Unable to parse descriptor of type %s. See file "
|
||||||
"unparseable-desc in data directory for details.", type);
|
"unparseable-desc in data directory for details.", type);
|
||||||
tor_free(content);
|
tor_free(content);
|
||||||
|
Loading…
Reference in New Issue
Block a user