Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP client: fix mutex deadlock in satip_frontend_decode_rtcp, fixe…
…s #3638
  • Loading branch information
perexg committed Mar 17, 2016
1 parent fa09958 commit 47e326f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -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';
Expand Down

0 comments on commit 47e326f

Please sign in to comment.