Merge commit 'origin/maint-0.2.1'

This commit is contained in:
Nick Mathewson 2010-02-07 22:34:08 -05:00
commit 080e8f50f8
2 changed files with 12 additions and 2 deletions

View File

@ -51,6 +51,13 @@ Changes in version 0.2.1.23 - 2010-0?-??
automatically discard guards picked using the old algorithm. Fixes automatically discard guards picked using the old algorithm. Fixes
bug 1217; bugfix on 0.2.1.3-alpha. Found by Mike Perry. bug 1217; bugfix on 0.2.1.3-alpha. Found by Mike Perry.
o Major bugfixes:
- Fix a potential buffer overflow in lookup_last_hid_serv_request()
that could happen on 32-bit platforms with 64-bit time_t. Also fix
a memory leak when requesting a hidden service descriptor we've
requested before. Fixes bug 1242, bugfix on 0.2.0.18-alpha. Found
by aakova.
o Minor bugfixes: o Minor bugfixes:
- When deciding whether to use strange flags to turn TLS renegotiation - When deciding whether to use strange flags to turn TLS renegotiation
on, detect the OpenSSL version at run-time, not compile time. We on, detect the OpenSSL version at run-time, not compile time. We

View File

@ -332,9 +332,12 @@ lookup_last_hid_serv_request(routerstatus_t *hs_dir,
tor_snprintf(hsdir_desc_comb_id, sizeof(hsdir_desc_comb_id), "%s%s", tor_snprintf(hsdir_desc_comb_id, sizeof(hsdir_desc_comb_id), "%s%s",
hsdir_id_base32, desc_id_base32); hsdir_id_base32, desc_id_base32);
if (set) { if (set) {
last_request_ptr = tor_malloc_zero(sizeof(time_t *)); time_t *oldptr;
last_request_ptr = tor_malloc_zero(sizeof(time_t));
*last_request_ptr = now; *last_request_ptr = now;
strmap_set(last_hid_serv_requests, hsdir_desc_comb_id, last_request_ptr); oldptr = strmap_set(last_hid_serv_requests, hsdir_desc_comb_id,
last_request_ptr);
tor_free(oldptr);
} else } else
last_request_ptr = strmap_get_lc(last_hid_serv_requests, last_request_ptr = strmap_get_lc(last_hid_serv_requests,
hsdir_desc_comb_id); hsdir_desc_comb_id);