[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19038 [Core Tor/Tor]: Test failure on the latest commit
#19038: Test failure on the latest commit
--------------------------+----------------------------------
Reporter: cypherpunks | Owner:
Type: defect | Status: needs_review
Priority: Medium | Milestone:
Component: Core Tor/Tor | Version: Tor: unspecified
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+----------------------------------
Changes (by cypherpunks):
* status: new => needs_review
Comment:
As suggested by another cypherpunk in ticket:18363#comment:29 the issue is
caused by an incorrect memory allocation.
{{{
diff --git a/src/common/pubsub.c b/src/common/pubsub.c
index 98ec3f8..b3faf40 100644
--- a/src/common/pubsub.c
+++ b/src/common/pubsub.c
@@ -48,7 +48,7 @@ pubsub_subscribe_(pubsub_topic_t *topic,
if (subscribe_flags & SUBSCRIBE_ATSTART) {
tor_assert(topic->n_events_fired == 0);
}
- pubsub_subscriber_t *r = tor_malloc_zero(sizeof(r));
+ pubsub_subscriber_t *r = tor_malloc_zero(sizeof(*r));
r->priority = priority;
r->subscriber_flags = subscribe_flags;
r->fn = fn;
}}}
This patch fixes the issue for me.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19038#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs