Skip to content
Snippets Groups Projects
Commit dfd6d83e authored by Steve Lhomme's avatar Steve Lhomme
Browse files

yuvp: assert on bogus palette

It's better to detect early that the palette is bogus (bad copy, cleaned
format, etc) than write too far in memory.
parent 3dc2d018
No related branches found
No related tags found
Loading
Pipeline #447553 passed with stage
in 17 minutes and 26 seconds
......@@ -132,6 +132,7 @@ static void Convert( filter_t *p_filter, picture_t *p_source,
vlc_assert_unreachable();
/* Create a RGBA palette */
assert(p_yuvp->i_entries <= VIDEO_PALETTE_COLORS_MAX);
rgbp.i_entries = p_yuvp->i_entries;
for( int i = 0; i < p_yuvp->i_entries; i++ )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment