Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > e72214a625f100adcb6aede9ed87048f > files > 5

gstreamer1.0-plugins-bad-1.4.3-2.1.mga5.src.rpm

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: [PATCH] h264parse: Ensure codec_data has the required size when
 reading number of SPS

https://bugzilla.gnome.org/show_bug.cgi?id=774896
---
 gst/videoparsers/gsth264parse.c | 4 ++++
 1 file changed, 4 insertions(+)

Index: gst-plugins-bad1.0-1.4.4/gst/videoparsers/gsth264parse.c
===================================================================
--- gst-plugins-bad1.0-1.4.4.orig/gst/videoparsers/gsth264parse.c
+++ gst-plugins-bad1.0-1.4.4/gst/videoparsers/gsth264parse.c
@@ -1942,6 +1942,10 @@ gst_h264_parse_set_caps (GstBaseParse *
       off = nalu.offset + nalu.size;
     }
 
+    if (off >= size) {
+      gst_buffer_unmap (codec_data, &map);
+      goto avcc_too_small;
+    }
     num_pps = data[off];
     off++;