X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fcinedec.c;h=0f2453cdf59b3a75d73e0c91991ad49efdc4a32e;hb=82f9eb6f6c7165a404426bee8a61aac76508a177;hp=de34fb963820188a8c9965263978cb4a408d33d9;hpb=29929fc8e2449d2db8bd144b2badc8d1e6347412;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; }