Changeset 1c73391d in ffmpeg


Ignore:
Timestamp:
Dec 18, 2011, 9:46:29 PM (13 years ago)
Author:
Michael Niedermayer <michaelni@gmx.at>
Branches:
master
Children:
a9ef21bb
Parents:
af3f2a87
git-author:
Michael Niedermayer <michaelni@gmx.at> (12/18/11 21:43:19)
git-committer:
Michael Niedermayer <michaelni@gmx.at> (12/18/11 21:46:29)
Message:

siff: Fix excessive memory allocation.
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libavformat/siff.c

    raf3f2a87 r1c73391d  
    202202
    203203        if (!c->curstrm){
     204            int64_t fsize= avio_size(s->pb);
    204205            size = c->pktsize - c->sndsize;
     206            if(fsize>0)
     207                size= FFMIN(size, fsize - avio_tell(s->pb) + c->gmcsize + 3);
     208            if(size < 2 + c->gmcsize || c->pktsize < c->sndsize)
     209                return AVERROR_INVALIDDATA;
    205210            if (av_new_packet(pkt, size) < 0)
    206211                return AVERROR(ENOMEM);
Note: See TracChangeset for help on using the changeset viewer.