[Ffmpeg-devel] Wavpack decoded packet size?

Kostya kostya.shishkov
Fri Oct 13 06:23:32 CEST 2006


On Thu, Oct 12, 2006 at 11:56:18AM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Tue, Oct 10, 2006 at 04:45:38PM +0300, Uoti Urpala wrote:
> > On Tue, 2006-10-10 at 07:07 +0300, Kostya wrote:
> > > On Mon, Oct 09, 2006 at 08:04:38PM +0300, Uoti Urpala wrote:
> > > > Is there any size limit on decoded wavpack packet size that would
> > > > prevent wavpack.c from overflowing AVCODEC_MAX_AUDIO_FRAME_SIZE? I
> > > > didn't notice anything in wavpack.c with a quick look, but didn't try to
> > > > construct an example to verify.
> > > 
> > > Look in libavformat/wv.c, lines 176-179
> > 
> > That might work when the demuxing is done by libavformat, but what about
> > players using another demuxer or (more likely) allowing wavpack audio in
> > another container? I think the decoder shouldn't rely on another part of
> > the code having checked the packets beforehand to avoid buffer overflow.
> 
> seconded, a decoder should not depend on a demuxer doing sanity checks

Maybe yes, but:
a) what decoders do actually check for overflow (I found only vorbis and raw PCM)
b) external demuxer may pass greater buffer to decoder and everything will be fine

this leads us to a long-discussed questions of API change (for audio, palette, etc.)
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> In the past you could go to a library and read, borrow or copy any book
> Today you'd get arrested for mere telling someone where the library is
> 




More information about the ffmpeg-devel mailing list