Commit 5bd24bc3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- Reject SAP announces for layered streams since VLC does not support them

 - Add brackets whenever there is a colon to avoid potentially harmful
   playlist injection through SAP.

Unfortunately, the SAP receiver has been heavily refactored in 0.9.0/trunk.
This series of commits tries to address of the bugs that were already fixed
without backporting the all refactored code. Needs testing (ECP people?).
parent e089ae61
......@@ -960,9 +960,23 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
psz_eof = strchr( psz_parse, '/' );
if( psz_eof )
{
*psz_eof = '\0';
if (p_sdp->i_in == 4)
{
/* Skip IPv4-specific TTL indication */
psz_eof = strchr (psz_parse, '/');
}
if ((psz_eof != NULL) && (atoi (psz_eof + 1) != 1))
{
msg_Warn (p_obj, "unsupported layered stream (%s layers)",
psz_eof + 1);
return VLC_EGENERIC;
}
}
if( ( p_sdp->i_in == 6 ) && strchr( psz_parse, ':' ) )
if( strchr( psz_parse, ':' ) != NULL )
{
if( asprintf( &psz_uri, "[%s]", psz_parse ) == -1 )
psz_uri = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment