Blame SOURCES/0001-h264parse-Ensure-codec_data-has-the-required-size-wh.patch

a729fc
From 38c20972b843f200af22ab9206b1aa64605a8a04 Mon Sep 17 00:00:00 2001
a729fc
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
a729fc
Date: Wed, 23 Nov 2016 10:51:17 +0200
a729fc
Subject: [PATCH 1/4] h264parse: Ensure codec_data has the required size when
a729fc
 reading number of SPS
a729fc
a729fc
https://bugzilla.gnome.org/show_bug.cgi?id=774896
a729fc
---
a729fc
 gst/videoparsers/gsth264parse.c | 4 ++++
a729fc
 1 file changed, 4 insertions(+)
a729fc
a729fc
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
a729fc
index 506cd61..36cfb69 100644
a729fc
--- a/gst/videoparsers/gsth264parse.c
a729fc
+++ b/gst/videoparsers/gsth264parse.c
a729fc
@@ -1942,6 +1942,10 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
a729fc
       off = nalu.offset + nalu.size;
a729fc
     }
a729fc
 
a729fc
+    if (off >= size) {
a729fc
+      gst_buffer_unmap (codec_data, &map);
a729fc
+      goto avcc_too_small;
a729fc
+    }
a729fc
     num_pps = data[off];
a729fc
     off++;
a729fc
 
a729fc
-- 
a729fc
2.9.3
a729fc