[FFmpeg-devel] [PATCH] Add IFF metadata handling

Michael Niedermayer michaelni
Wed May 5 15:28:21 CEST 2010


On Wed, May 05, 2010 at 02:55:53PM +0200, Sebastian Vater wrote:
> Michael Niedermayer a ?crit :
> > On Mon, May 03, 2010 at 09:20:32PM +0200, Sebastian Vater wrote:
> >   
> >
> >>  iff.c |   48 +++++++++++++++++++++++++++++++++++++++++-------
> >>  1 file changed, 41 insertions(+), 7 deletions(-)
> >> 47b4dc99704e664139fa93ec6c6e5fabf94716ef  iff-metadata.patch
> >> diff --git a/libavformat/iff.c b/libavformat/iff.c
> >> index db74b8d..896c25b 100644
> >> --- a/libavformat/iff.c
> >> +++ b/libavformat/iff.c
> >> @@ -92,6 +92,25 @@ static void interleave_stereo(const uint8_t *src, uint8_t *dest, int size)
> >>      }
> >>  }
> >>  
> >> +/* Metadata string read */
> >> +static int get_metadata(AVFormatContext *s,
> >> +                        const char *const tag,
> >> +                        const unsigned data_size)
> >> +{
> >> +    uint8_t *buf = av_malloc(data_size + 1);
> >>     
> >
> > integer overflow
> >   
> 
> Fixed!
> 
> >> +
> >> +    if (!buf)
> >> +        return AVERROR(ENOMEM);
> >> +
> >> +    if (get_buffer(s->pb, buf, data_size) < 0) {
> >>     
> >
> > segfault
> >   
> 
> Fixed! Just see attached patch.
> 
> -- 
> 
> Best regards,
>                    :-) Basty/CDGS (-:
> 

>  iff.c |   48 +++++++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 41 insertions(+), 7 deletions(-)
> 3de4ef81326dd273daa99e47d9d362d09fabb94a  iff-metadata.patch
> diff --git a/libavformat/iff.c b/libavformat/iff.c
> index db74b8d..896c25b 100644
> --- a/libavformat/iff.c
> +++ b/libavformat/iff.c

looks ok f tested

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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/20100505/33a40800/attachment.pgp>



More information about the ffmpeg-devel mailing list