summaryrefslogtreecommitdiff
path: root/libavformat/hcom.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-01-16 10:26:53 +0100
committerPaul B Mahol <onemda@gmail.com>2019-01-16 10:26:53 +0100
commit282a4718576d6928b6c5900db89b45d83556407a (patch)
treef86adb204818674c9982dc39cdf0189c54d92346 /libavformat/hcom.c
parent51978aefe8074cc3e020994f6b329387b2149cb8 (diff)
downloadffmpeg-282a4718576d6928b6c5900db89b45d83556407a.tar.gz
avformat/hcom: check probe buffer size
Diffstat (limited to 'libavformat/hcom.c')
-rw-r--r--libavformat/hcom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/hcom.c b/libavformat/hcom.c
index 933ecce373..35515cc5b2 100644
--- a/libavformat/hcom.c
+++ b/libavformat/hcom.c
@@ -27,6 +27,8 @@
static int hcom_probe(AVProbeData *p)
{
+ if (p->buf_size < 132)
+ return 0;
if (!memcmp(p->buf+65, "FSSD", 4) &&
!memcmp(p->buf+128, "HCOM", 4))
return AVPROBE_SCORE_MAX;