[FFmpeg-devel] [PATCH 5/8] Reject audio tracks with invalid interleaver parameters in RM demuxer.

Michael Niedermayer michaelni at gmx.at
Sat Sep 17 18:30:35 CEST 2011


On Sat, Sep 17, 2011 at 06:14:12PM +0200, Michael Niedermayer wrote:
> On Sat, Sep 17, 2011 at 04:56:33PM +0200, fenrir at elivagar.org wrote:
> > From: Laurent Aimar <fenrir at videolan.org>
> > 
> > ---
> >  libavformat/rmdec.c |   10 ++++++----
> >  1 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
> > index 1c96573..81f563e 100644
> > --- a/libavformat/rmdec.c
> > +++ b/libavformat/rmdec.c
> > @@ -215,8 +215,9 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
> >              ast->audio_framesize = st->codec->block_align;
> >              st->codec->block_align = coded_framesize;
> >  
> > -            if(ast->audio_framesize >= UINT_MAX / sub_packet_h){
> > -                av_log(s, AV_LOG_ERROR, "ast->audio_framesize * sub_packet_h too large\n");
> > +            if (ast->audio_framesize <= 0 || sub_packet_h <= 0 ||
> > +                ast->audio_framesize >= UINT_MAX / sub_packet_h){
> > +                av_log(s, AV_LOG_ERROR, "ast->audio_framesize * sub_packet_h is invalid\n");
> >                  return -1;
> 
> should be INT_MAX

this is of course a comment unrelated to the patch as this issue
existed before

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20110917/c1393b8e/attachment.asc>


More information about the ffmpeg-devel mailing list