[tor-commits] [tor/release-0.2.5] Enlarge the buffer for a line in a bw file

nickm at torproject.org nickm at torproject.org
Mon Mar 9 17:37:06 UTC 2015


commit 2b9d48791d0b5245e3ccfd267150dfa34541c87c
Author: Sebastian Hahn <sebastian at torproject.org>
Date:   Wed Jan 7 12:43:21 2015 +0100

    Enlarge the buffer for a line in a bw file
---
 changes/bug14125 |    5 +++++
 src/or/dirserv.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug14125 b/changes/bug14125
new file mode 100644
index 0000000..fe6821a
--- /dev/null
+++ b/changes/bug14125
@@ -0,0 +1,5 @@
+  o Minor bugfixes (dirauth):
+    - Enlarge the buffer to read bw-auth generated files to avoid an
+      issue when parsing the file in dirserv_read_measured_bandwidths().
+      Bugfix on 0.2.2.1-alpha, fixes #14125.
+
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 49fafaf..03b32cb 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2487,7 +2487,7 @@ int
 dirserv_read_measured_bandwidths(const char *from_file,
                                  smartlist_t *routerstatuses)
 {
-  char line[256];
+  char line[512];
   FILE *fp = tor_fopen_cloexec(from_file, "r");
   int applied_lines = 0;
   time_t file_time, now;





More information about the tor-commits mailing list