]> git.sesse.net Git - ffmpeg/commitdiff
avformat/argo_asf: bail if invalid tag
authorZane van Iperen <zane@zanevaniperen.com>
Sun, 6 Sep 2020 01:00:17 +0000 (11:00 +1000)
committerZane van Iperen <zane@zanevaniperen.com>
Mon, 14 Sep 2020 04:23:15 +0000 (14:23 +1000)
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
libavformat/argo_asf.c

index bf9b5d0c0a081e862f9eae1fd880ff789c31d1f4..208280b4d9d216b9832d964a11d4840af0a85649 100644 (file)
@@ -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) {