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

Ian Caulfield ian.caulfield
Mon Nov 19 11:32:05 CET 2007

On Nov 18, 2007 1:42 PM, elupus <elupus at ecce.se> wrote:
> "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.

Yep - your fix looks fine, but a test case is always good! Hopefully
non-mangled patch attached.

What was the other issue you were encountering?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvbsub.patch
Type: text/x-diff
Size: 475 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071119/a65b018a/attachment.patch>

More information about the ffmpeg-devel mailing list