diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-04-20 01:09:40 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-04-20 01:09:40 -0400 |
commit | f2c30e97cc61204d43040fc9d82ea114a87afdeb (patch) | |
tree | 20b23d49137f6952d1598c3f0476771cb5ceee11 /src | |
parent | de4a49adc2bc7bc8a2dfe44d75a47a828056a52c (diff) | |
download | tor-f2c30e97cc61204d43040fc9d82ea114a87afdeb.tar.gz tor-f2c30e97cc61204d43040fc9d82ea114a87afdeb.zip |
Switch geoip_get_request_history to asprintf; fix bug 1365
Diffstat (limited to 'src')
-rw-r--r-- | src/or/geoip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c index b5a0374c49..ea11dc323d 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -945,8 +945,8 @@ geoip_get_request_history(time_t now, geoip_client_action_t action) strings = smartlist_create(); SMARTLIST_FOREACH(entries, c_hist_t *, ent, { - char buf[32]; - tor_snprintf(buf, sizeof(buf), "%s=%u", ent->country, ent->total); + char *buf = NULL; + tor_asprintf(&buf, "%s=%u", ent->country, ent->total); smartlist_add(strings, buf); }); result = smartlist_join_strings(strings, ",", 0, NULL); |