From: Jaroslav Kysela Date: Thu, 17 Mar 2016 11:49:28 +0000 (+0100) Subject: SAT>IP client: fix mutex deadlock in satip_frontend_decode_rtcp, fixes #3638 X-Git-Tag: v4.2.1~845 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47e326fddef0eff75538c8b6c5a43fd560b12169;p=thirdparty%2Ftvheadend.git SAT>IP client: fix mutex deadlock in satip_frontend_decode_rtcp, fixes #3638 --- diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 159d50047..e0d5dd6d2 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -733,14 +733,14 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name, pthread_mutex_lock(&mmi->tii_stats_mutex); while (len >= 12) { if ((rtcp[0] & 0xc0) != 0x80) /* protocol version: v2 */ - return; + goto fail; l = (((rtcp[2] << 8) | rtcp[3]) + 1) * 4; /* length of payload */ if (rtcp[1] == 204 && l > 20 && /* packet type */ rtcp[8] == 'S' && rtcp[9] == 'E' && rtcp[10] == 'S' && rtcp[11] == '1') { /* workaround for broken minisatip */ if (l > len && l - 4 != len) - return; + goto fail; sl = (rtcp[14] << 8) | rtcp[15]; if (sl > 0 && l - 16 >= sl) { rtcp[sl + 16] = '\0';