mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Switch geoip_get_request_history to asprintf; fix bug 1365
This commit is contained in:
parent
de4a49adc2
commit
f2c30e97cc
4
changes/fix_bug_1365
Normal file
4
changes/fix_bug_1365
Normal file
@ -0,0 +1,4 @@
|
||||
o Minor bugfixes:
|
||||
- Fix a segfault when DirReqStatistics is enabled. Bug found by keb.
|
||||
Fixes bug 1365; bugfix on 0.2.2.11-alpha.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user