[FFmpeg-devel] [PATCH] dvb subtitle decoder doesn't setnb_colors correctly

elupus elupus
Sun Nov 18 14:42:12 CET 2007


"Ian Caulfield" <ian.caulfield at gmail.com> wrote in message 
news:27bbfebe0711180524y4f8b063emfeb3a44a2c4c1d1e at mail.gmail.com...
> Do you have any samples that fail?
>
> Ian


Nope can't say i do. Stumbled on it while debugging another issue I was 
having. But the palette is later allocated using:

rect->rgba_palette = av_malloc((1 << region->depth) * sizeof(uint32_t));

So unless you know how many colors there are in the palette, you end up 
risking accessing non allocated data, if the actually image data contains 
references to palette colors outside the number you have allocated.

Joakim







More information about the ffmpeg-devel mailing list