[FFmpeg-devel] [PATCH] Deprecate av_fifo_realloc() in favour of a safer av_fifo_realloc2()
Michael Niedermayer
michaelni
Thu Aug 7 00:58:09 CEST 2008
On Wed, Aug 06, 2008 at 12:01:32AM +0200, Stefano Sabatini wrote:
> Hi all,
>
> in the case the av_malloc() performed in av_fifo_init() inside
> av_fifo_relloc() fails, and if the buffer in the fifo to realloc
> contains something, the av_fifo_realloc() issues a crash.
>
> Test application which reproduces the issue and my solution attached.
>
> Yes the libavutil minor version bump is missing.
[...]
> Index: libavutil/fifo.h
> ===================================================================
> --- libavutil/fifo.h (revision 14627)
> +++ libavutil/fifo.h (working copy)
> @@ -97,10 +97,19 @@
> * Resizes an AVFifoBuffer.
> * @param *f AVFifoBuffer to resize
> * @param size new AVFifoBuffer size in bytes
> + * @see av_fifo_realloc2()
> */
> -void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
> +attribute_deprecated void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
>
should be under #if VERSION < ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080807/ce873446/attachment.pgp>
More information about the ffmpeg-devel
mailing list