[FFmpeg-devel] [PATCH 1/2] avutil/fifo: add function av_fifo_generic_peek_at()

Michael Niedermayer michael at niedermayer.cc
Wed Oct 14 15:02:16 CEST 2015


On Wed, Oct 14, 2015 at 02:20:07PM +0800, Zhang Rui wrote:
> ---
>  libavutil/fifo.c    | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  libavutil/fifo.h    | 11 +++++++++++
>  tests/ref/fate/fifo | 27 ++++++++++++++++++++++++++
>  3 files changed, 93 insertions(+)
> 
> diff --git a/libavutil/fifo.c b/libavutil/fifo.c
> index 07fb4ec..a7da591 100644
> --- a/libavutil/fifo.c
> +++ b/libavutil/fifo.c
> @@ -148,6 +148,38 @@ int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size,
>      return total - size;
>  }
>  
> +int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int))
> +{

    > +    uint8_t *rptr = f->rptr + offset;

this can overflow
fixed it and applied

thanks


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151014/3935d118/attachment.sig>


More information about the ffmpeg-devel mailing list