avformat/ffmdec: Check ffio_set_buf_size() return value
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Jun 2015 12:55:10 +0000 (14:55 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Jun 2015 12:55:10 +0000 (14:55 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/ffmdec.c

index 7c0f451..9b50c9f 100644 (file)
@@ -98,7 +98,9 @@ static int ffm_read_data(AVFormatContext *s,
     retry_read:
             if (pb->buffer_size != ffm->packet_size) {
                 int64_t tell = avio_tell(pb);
-                ffio_set_buf_size(pb, ffm->packet_size);
+                int ret = ffio_set_buf_size(pb, ffm->packet_size);
+                if (ret < 0)
+                    return ret;
                 avio_seek(pb, tell, SEEK_SET);
             }
             id = avio_rb16(pb); /* PACKET_ID */