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

Sebastian Vater cdgs.basty
Wed May 5 14:55:53 CEST 2010


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 (-:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-metadata.patch
Type: text/x-patch
Size: 2414 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100505/1847afdd/attachment.bin>



More information about the ffmpeg-devel mailing list