flacdec: skip frame when allocated data size is too small
authorJustin Ruggles <justin.ruggles@gmail.com>
Sun, 22 Mar 2009 21:31:23 +0000 (21:31 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sun, 22 Mar 2009 21:31:23 +0000 (21:31 +0000)
Originally committed as revision 18155 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/flacdec.c

index 80701f1..a3ce1aa 100644 (file)
@@ -693,7 +693,7 @@ static int flac_decode_frame(AVCodecContext *avctx,
     if (output_size > alloc_data_size) {
         av_log(s->avctx, AV_LOG_ERROR, "output data size is larger than "
                                        "allocated data size\n");
-        return -1;
+        goto end;
     }
     *data_size = output_size;