[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8564: Backport 8499: remove dangerous free(0) on hashtable init (in tor/branches/tor-0_1_1-patches: . src/common)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8564: Backport 8499: remove dangerous free(0) on hashtable init (in tor/branches/tor-0_1_1-patches: . src/common)
- From: nickm@xxxxxxxx
- Date: Sun, 1 Oct 2006 14:22:22 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 01 Oct 2006 14:22:29 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-10-01 14:22:22 -0400 (Sun, 01 Oct 2006)
New Revision: 8564
Modified:
tor/branches/tor-0_1_1-patches/ChangeLog
tor/branches/tor-0_1_1-patches/src/common/ht.h
Log:
Backport 8499: remove dangerous free(0) on hashtable init
Modified: tor/branches/tor-0_1_1-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_1-patches/ChangeLog 2006-10-01 18:16:48 UTC (rev 8563)
+++ tor/branches/tor-0_1_1-patches/ChangeLog 2006-10-01 18:22:22 UTC (rev 8564)
@@ -4,7 +4,12 @@
and we have a cached answer, give them the cached answer.
Previously, we would give them no answer at all.
+ o Minor bugfixes:
+ - Avoid a memory corruption bug when creating a hash table for the first
+ time.
+
+
Changes in version 0.1.1.24 - 2006-09-29
o Major bugfixes:
- Allow really slow clients to not hang up five minutes into their
Modified: tor/branches/tor-0_1_1-patches/src/common/ht.h
===================================================================
--- tor/branches/tor-0_1_1-patches/src/common/ht.h 2006-10-01 18:16:48 UTC (rev 8563)
+++ tor/branches/tor-0_1_1-patches/src/common/ht.h 2006-10-01 18:22:22 UTC (rev 8564)
@@ -379,7 +379,8 @@
elm = next; \
} \
} \
- freefn(head->hth_table); \
+ if (head->hth_table) \
+ freefn(head->hth_table); \
head->hth_table = new_table; \
} else { \
unsigned b, b2; \