From e1c7aa377f0bcd080239ef2d166ff94d5eeb11ee Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Mon, 2 Nov 2015 17:57:11 -0800 Subject: [PATCH] common: fix possible deadlock in trans --- common/trans.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/trans.c b/common/trans.c index 1e05864b..d9f71c8a 100644 --- a/common/trans.c +++ b/common/trans.c @@ -611,7 +611,8 @@ trans_write_copy_s(struct trans *self, struct stream *out_s) init_stream(wait_s, size); if (self->si != 0) { - if (self->si->cur_source != 0) + if ((self->si->cur_source != 0) && + (self->si->cur_source != self->my_source)) { self->si->source[self->si->cur_source] += size; wait_s->source = self->si->source + self->si->cur_source;