[FFmpeg-cvslog] mov: Validate cubemap layout

Vittorio Giovara git at videolan.org
Tue Oct 17 22:50:52 EEST 2017


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Tue Feb 28 11:27:02 2017 -0500| [114324b9e04505c71d9a3ffd854f25062fa3678f] | committer: Vittorio Giovara

mov: Validate cubemap layout

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=114324b9e04505c71d9a3ffd854f25062fa3678f
---

 libavformat/mov.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index f406831457..2bd48079ec 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3235,7 +3235,7 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
     AVStream *st;
     MOVStreamContext *sc;
-    int size, version;
+    int size, version, layout;
     int32_t yaw, pitch, roll;
     uint32_t tag;
     enum AVSphericalProjection projection;
@@ -3315,6 +3315,12 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     avio_skip(pb, 3); /* flags */
     switch (tag) {
     case MKTAG('c','b','m','p'):
+        layout = avio_rb32(pb);
+        if (layout) {
+            av_log(c->fc, AV_LOG_WARNING,
+                   "Unsupported cubemap layout %d\n", layout);
+            return 0;
+        }
         projection = AV_SPHERICAL_CUBEMAP;
         break;
     case MKTAG('e','q','u','i'):



More information about the ffmpeg-cvslog mailing list