[FFmpeg-devel] [PATCH 2/2] avformat/aiff: ID3 chunks can occur multiple times, so always zeroise the id3v2_extra_meta pointer

Michael Niedermayer michaelni at gmx.at
Fri Apr 18 23:03:35 CEST 2014


On Fri, Apr 18, 2014 at 02:50:41PM +1000, Peter Ross wrote:
> Fixes ticket #3530.
> 
> Signed-off-by: Peter Ross <pross at xvid.org>
> ---
>  libavformat/aiffdec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
> index 81bcc64..40da4b8 100644
> --- a/libavformat/aiffdec.c
> +++ b/libavformat/aiffdec.c
> @@ -198,7 +198,7 @@ static int aiff_read_header(AVFormatContext *s)
>      AVIOContext *pb = s->pb;
>      AVStream * st;
>      AIFFInputContext *aiff = s->priv_data;
> -    ID3v2ExtraMeta *id3v2_extra_meta = NULL;
> +    ID3v2ExtraMeta *id3v2_extra_meta;
>  
>      /* check FORM header */
>      filesize = get_tag(pb, &tag);
> @@ -237,6 +237,7 @@ static int aiff_read_header(AVFormatContext *s)
>              break;
>          case MKTAG('I', 'D', '3', ' '):
>              position = avio_tell(pb);
> +            id3v2_extra_meta = NULL;
>              ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, size);
>              if (id3v2_extra_meta)
>                  if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0) {

instead of this, i think ff_id3v2_free_extra_meta() should NULL its
argument

[...]

-- 
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: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140418/028ec856/attachment.asc>


More information about the ffmpeg-devel mailing list