[FFmpeg-devel] [PATCH] Handle memory allocation failure
Baptiste Coudurier
baptiste.coudurier
Mon Dec 3 23:27:55 CET 2007
Panagiotis Issaris wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> The attached patch handles memory allocation failure, which was
> currently ignored similarly to the problem mentioned in issue 286.
>
> mov.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> With friendly regards,
> Takis
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHVDoG9kOxLuzz4CkRAvGbAJ9m4piOwGM034yD/p27NlgKuIBq4wCfa9On
> XJ2l2v8Us+FuxRGP+2lpt5g=
> =jNSy
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------
>
> Index: libavformat/mov.c
> ===================================================================
> --- libavformat/mov.c (revision 11160)
> +++ libavformat/mov.c (working copy)
> @@ -1005,6 +1012,10 @@
>
> sc->ctts_count = entries;
> sc->ctts_data = av_malloc(entries * sizeof(MOV_stts_t));
> + if (!sc->ctts_data) {
> + av_log(NULL, AV_LOG_ERROR, "error allocation memory for ctts atom\n");
> + return -1;
> + }
>
> dprintf(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
>
>
>
Fixed.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list