mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
idf: Improve idf_probe() so it doesnt succeed on 0 byte input
This commit is contained in:
parent
3e01c9b547
commit
658c5209fb
@ -261,7 +261,9 @@ static const uint8_t idf_magic[] = {
|
|||||||
|
|
||||||
static int idf_probe(AVProbeData *p)
|
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 AVPROBE_SCORE_MAX;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user