BinDemuxContext *bin = s->priv_data;
ByteIOContext *pb = s->pb;
char fontheight, flags;
- uint8_t *h;
AVStream *st = init_stream(s, ap);
if (!st)
st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256);
st->codec->codec_id = flags & 4 ? CODEC_ID_XBIN : CODEC_ID_BINTEXT;
- h = st->codec->extradata = av_malloc(st->codec->extradata_size);
+ st->codec->extradata = av_malloc(st->codec->extradata_size);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
st->codec->extradata[0] = fontheight;
static int idf_probe(AVProbeData *p)
{
- if (!memcmp(p->buf, idf_magic, FFMIN(sizeof(idf_magic), p->buf_size)))
+ if (p->buf_size < sizeof(idf_magic))
+ return 0;
+ if (!memcmp(p->buf, idf_magic, sizeof(idf_magic)))
return AVPROBE_SCORE_MAX;
return 0;
}