X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fcinedec.c;h=0f2453cdf59b3a75d73e0c91991ad49efdc4a32e;hb=8c3e9c9cbb725b6fdfe008ded702f3dd8025a58d;hp=de34fb963820188a8c9965263978cb4a408d33d9;hpb=50ae1f7e0ff1fa00236622415039f7e28d919a25;p=ffmpeg diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index de34fb96382..0f2453cdf59 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -56,7 +56,7 @@ enum { #define CFA_BLGRAY 0x20000000U #define CFA_BRGRAY 0x10000000U -static int cine_read_probe(AVProbeData *p) +static int cine_read_probe(const AVProbeData *p) { int HeaderSize; if (p->buf[0] == 'C' && p->buf[1] == 'I' && // Type @@ -168,6 +168,10 @@ static int cine_read_header(AVFormatContext *avctx) avio_skip(pb, 616); // Binning .. bFlipH if (!avio_rl32(pb) ^ vflip) { st->codecpar->extradata = av_strdup("BottomUp"); + if (!st->codecpar->extradata) { + st->codecpar->extradata_size = 0; + return AVERROR(ENOMEM); + } st->codecpar->extradata_size = 9; }