[FFmpeg-devel] [PATCH] Fix segfault when decoding corrupt mov (Closes issue 286)
Baptiste Coudurier
baptiste.coudurier
Mon Dec 3 18:19:40 CET 2007
Hi
Panagiotis Issaris wrote:
> Hi,
>
> The attached patch handles memory allocation failure, which was
> currently ignored causing ffmpeg to crash for the file mentioned in
> issue 286.
>
> mov.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> With friendly regards,
> Takis
------------------------------------------------------------------------
Index: libavformat/mov.c
===================================================================
--- libavformat/mov.c (revision 11160)
+++ libavformat/mov.c (working copy)
@@ -963,6 +966,10 @@
sc->stts_count = entries;
sc->stts_data = av_malloc(entries * sizeof(MOV_stts_t));
+ if (!sc->stts_data) {
+ av_log(NULL, AV_LOG_ERROR, "error allocation memory for stts
atom\n");
c->fc instead of NULL. read_ctts miss it too, can you please add it ? :>
--
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