[FFmpeg-devel] [RFC]Possible problem in avio.c

Aurelien Jacobs aurel
Mon Dec 22 02:06:51 CET 2008


Carl Eugen Hoyos wrote:

> Hi!
> 
> Regression tests contain following command:
> ./ffmpeg_g -y -flags +bitexact -dct fastint -idct simple -sws_flags 
> +accurate_rnd+bitexact -i ././tests/data/a-pcm_s16be.mkv -sample_fmt s16 
> -f wav ././tests/data/pcm.vsynth.out.wav
> 
> This line crashes if ffmpeg was compiled with icc 10.1 64bit.
> Backtrace shows the crash occurs in line 584 of avio.c. The crash 
> disappears if I compile just avio.c with gcc.
> 
> But if attached patch is applied, the crash also occurs if the whole 
> project is compiled with gcc, so I suspect a problem either with avio or 
> the code in matroskadec that calls it.

init_put_byte() calls url_resetbuf() before initializing s->opaque.
Then url_resetbuf() access s->opaque as a URLContext pointer...
So init_put_byte() should really initialize s->opaque before
calling url_resetbuf().
See attached patch.

Aurel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avio_opaque.diff
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081222/0483d79b/attachment.bin>



More information about the ffmpeg-devel mailing list