diff mbox series

[FFmpeg-devel,v2,1/4] avformat/argo_asf: bail if invalid tag

Message ID 20200909000417.24473-2-zane@zanevaniperen.com
State Accepted
Headers show
Series Add demuxer for Argonaut Games BRP files | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Zane van Iperen Sept. 9, 2020, 12:04 a.m. UTC
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
---
 libavformat/argo_asf.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c
index bf9b5d0c0a..208280b4d9 100644
--- a/libavformat/argo_asf.c
+++ b/libavformat/argo_asf.c
@@ -144,6 +144,9 @@  static int argo_asf_read_header(AVFormatContext *s)
 
     argo_asf_parse_file_header(&asf->fhdr, buf);
 
+    if (asf->fhdr.magic != ASF_TAG)
+        return AVERROR_INVALIDDATA;
+
     if (asf->fhdr.num_chunks == 0) {
         return AVERROR_INVALIDDATA;
     } else if (asf->fhdr.num_chunks > 1) {