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

Michael Niedermayer michaelni
Mon Nov 19 21:34:02 CET 2007


On Mon, Nov 19, 2007 at 10:32:05AM +0000, Ian Caulfield wrote:
> 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.

patch looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071119/ab605f80/attachment.pgp>



More information about the ffmpeg-devel mailing list