[FFmpeg-devel] [PATCH 1/3] Support palette information for vobsub's stored as text in extradata

Michael Niedermayer michaelni at gmx.at
Sun Sep 11 21:35:04 CEST 2011


On Sun, Sep 11, 2011 at 07:58:25PM +0200, Joakim Plate wrote:
> This is how mkv's store palette information for vobsubs
[...]
> @@ -497,10 +512,53 @@ static int dvdsub_decode(AVCodecContext *avctx,
>      return buf_size;
>  }
>  
> +static int dvdsub_init(AVCodecContext *avctx)
> +{
> +    DVDSubContext *ctx = (DVDSubContext*) avctx->priv_data;
> +    char *data = avctx->extradata;
> +
> +    if (!avctx->extradata || !avctx->extradata_size)
> +        return 1;
> +
> +    data[avctx->extradata_size] = '\0';

this does not look safe

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110911/ff953e99/attachment.asc>


More information about the ffmpeg-devel mailing list