Commit 88fcc88c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix TTL range check

parent b25c2e85
......@@ -364,10 +364,10 @@ static int Open( vlc_object_t *p_this )
* ttl are set. */
val.i_int = config_GetInt( p_stream, "ttl" );
}
if( p_sys->i_ttl > 255 ) p_sys->i_ttl = 255;
if( val.i_int > 255 ) val.i_int = 255;
/* must not exceed 999 once formatted */
if( p_sys->i_ttl < 0 )
if( val.i_int < 0 )
{
msg_Err( p_stream, "illegal TTL %d", val.i_int );
free( p_sys );
......
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