Commit 9aba8655 authored by Laurent Aimar's avatar Laurent Aimar

Improved flac SyncInfo robustness by using stream info when available (close 1847).

parent 334c6a54
......@@ -1058,6 +1058,13 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
return 0;
}
/* Sanity check using stream info header when possible */
if( p_sys->b_stream_info )
{
if( i_blocksize < p_sys->stream_info.min_blocksize ||
i_blocksize > p_sys->stream_info.max_blocksize )
return 0;
}
return i_blocksize;
}
......
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