[FFmpeg-devel] [PATCH] aviobuf: Write new data at s->buf_end in fill_buffer

Michael Niedermayer michaelni
Tue Mar 1 22:12:09 CET 2011

On Sun, Feb 27, 2011 at 01:02:32AM +0200, Martin Storsj? wrote:
> In most cases, s->buf_ptr will be equal to s->buf_end when
> fill_buffer is called, but this may not always be the case, if
> we're seeking forward by reading (permitted by the short seek
> threshold).
> If fill_buffer is writing to s->buf_ptr instead of s->buf_end (when
> they aren't equal and s->buf_ptr is ahead of s->buffer), the data
> between s->buf_ptr and s->buf_end is overwritten, leading to
> inconsistent buffer content. This could return incorrect data if
> later seeking back into the area before the current s->buf_ptr.
> ---
>  libavformat/aviobuf.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

looks ok

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110301/5611914e/attachment.pgp>

More information about the ffmpeg-devel mailing list