aboutsummaryrefslogtreecommitdiffstats
path: root/main/gst-plugins-bad1/CVE-2016-9809.patch
blob: 5d9f9c8c3de71f0b62e367251db6d0f65b2382f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 1dbfef93d6aca245f1793f9b5348a9dbcd02be97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Wed, 23 Nov 2016 10:51:17 +0200
Subject: h264parse: Ensure codec_data has the required size when reading
 number of SPS

https://bugzilla.gnome.org/show_bug.cgi?id=774896

diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index be2f462..e4dcbc3 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -2583,6 +2583,10 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
       off = nalu.offset + nalu.size;
     }
 
+    if (off >= size) {
+      gst_buffer_unmap (codec_data, &map);
+      goto avcc_too_small;
+    }
     num_pps = data[off];
     off++;
 
-- 
cgit v0.10.2