[FFmpeg-cvslog] r24251 - trunk/libavcodec/vp8.c
conrad
subversion
Fri Jul 16 09:20:31 CEST 2010
Author: conrad
Date: Fri Jul 16 09:20:31 2010
New Revision: 24251
Log:
vp8: Check for malloc failure
Modified:
trunk/libavcodec/vp8.c
Modified: trunk/libavcodec/vp8.c
==============================================================================
--- trunk/libavcodec/vp8.c Fri Jul 16 01:02:34 2010 (r24250)
+++ trunk/libavcodec/vp8.c Fri Jul 16 09:20:31 2010 (r24251)
@@ -225,6 +225,9 @@ static int update_dimensions(VP8Context
s->intra4x4_pred_mode_base = av_mallocz(s->b4_stride*(4*s->mb_height+1));
s->top_nnz = av_mallocz(s->mb_width*sizeof(*s->top_nnz));
+ if (!s->macroblocks_base || !s->intra4x4_pred_mode_base || !s->top_nnz)
+ return AVERROR(ENOMEM);
+
s->macroblocks = s->macroblocks_base + 1 + s->mb_stride;
s->intra4x4_pred_mode = s->intra4x4_pred_mode_base + 4 + s->b4_stride;
More information about the ffmpeg-cvslog
mailing list