summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2010-01-25 18:44:17 +0000
committerSebastian Hahn <sebastian@torproject.org>2010-01-26 11:55:43 +0100
commit7e65871ccc49f6f25f8782789283cf2afef6e86b (patch)
treec306dda2137e8799a29fb6f2ddd018c30e4f3157 /src/or/or.h
parent2d3f21e9ee5d173640b83b21913da692e74ede10 (diff)
downloadtor-7e65871ccc49f6f25f8782789283cf2afef6e86b.tar.gz
tor-7e65871ccc49f6f25f8782789283cf2afef6e86b.zip
Fix a memory corruption bug while collecting bridge stats
We accidentally freed the internal buffer for bridge stats when we were writing the bridge stats file or honoring a control port request for said data. Change the interfaces for geoip_get_bridge_stats* to prevent these problems, and remove the offending free/add a tor_strdup. Fixes bug 1208.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 091d819f79..e0b86387fa 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4137,8 +4137,8 @@ void geoip_entry_stats_init(time_t now);
void geoip_entry_stats_write(time_t now);
void geoip_bridge_stats_init(time_t now);
time_t geoip_bridge_stats_write(time_t now);
-char *geoip_get_bridge_stats_extrainfo(time_t);
-char *geoip_get_bridge_stats_controller(time_t);
+const char *geoip_get_bridge_stats_extrainfo(time_t);
+const char *geoip_get_bridge_stats_controller(time_t);
/********************************* hibernate.c **********************/