Package: gst-plugins-good1.0 / 1.4.4-2+deb8u3

0001-aacparse-Make-sure-we-have-enough-data-in-the-codec_.patch Patch series | download
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
27
28
29
30
31
32
From 87a2c140ca54c5128093377e9b25a5c24b346727 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Thu, 1 Dec 2016 13:38:16 +0200
Subject: [PATCH] aacparse: Make sure we have enough data in the codec_data to
 be able to parse it

Also error out cleanly if mapping the buffer failed.

https://bugzilla.gnome.org/show_bug.cgi?id=775450
---
 gst/audioparsers/gstaacparse.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: gst-plugins-good1.0-1.4.4/gst/audioparsers/gstaacparse.c
===================================================================
--- gst-plugins-good1.0-1.4.4.orig/gst/audioparsers/gstaacparse.c
+++ gst-plugins-good1.0-1.4.4/gst/audioparsers/gstaacparse.c
@@ -296,11 +296,12 @@ gst_aac_parse_sink_setcaps (GstBaseParse
   if (value) {
     GstBuffer *buf = gst_value_get_buffer (value);
 
-    if (buf) {
+    if (buf && gst_buffer_get_size (buf) >= 2) {
       GstMapInfo map;
       guint sr_idx;
 
-      gst_buffer_map (buf, &map, GST_MAP_READ);
+      if (!gst_buffer_map (buf, &map, GST_MAP_READ))
+        return FALSE;
 
       sr_idx = ((map.data[0] & 0x07) << 1) | ((map.data[1] & 0x80) >> 7);
       aacparse->object_type = (map.data[0] & 0xf8) >> 3;