CVE-2017-14171
authorMarkus Koschany <apo@debian.org>
Sun, 30 Dec 2018 19:51:01 +0000 (20:51 +0100)
committerMike Gabriel <sunweaver@debian.org>
Sat, 31 Aug 2019 15:36:55 +0000 (16:36 +0100)
Origin: https://github.com/FFmpeg/FFmpeg/commit/c24bcb553650b91e9eff15ef6e54ca73de2453b7

Gbp-Pq: Name CVE-2017-14171.patch

libavformat/nsvdec.c

index 670b8678c8b15ab2da7d6f81f604baf2060b17f2..25cc44367b918a5124bfd0150098116b3d8ece08 100644 (file)
@@ -351,8 +351,11 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
         if (!nsv->nsvs_file_offset)
             return AVERROR(ENOMEM);
 
-        for(i=0;i<table_entries_used;i++)
+        for(i=0;i<table_entries_used;i++) {
+            if (avio_feof(pb))
+                return AVERROR_INVALIDDATA;
             nsv->nsvs_file_offset[i] = avio_rl32(pb) + size;
+        }
 
         if(table_entries > table_entries_used &&
            avio_rl32(pb) == MKTAG('T','O','C','2')) {