File gstreamer-h264-size.patch of Package gstreamer-0_10-plugins-bad.3942

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

Backported by Mike Gorse <mgorse@suse.com>
---
diff -urp gst-plugins-bad-0.10.23.orig/gst/videoparsers/gsth264parse.c gst-plugins-bad-0.10.23/gst/videoparsers/gsth264parse.c
--- gst-plugins-bad-0.10.23.orig/gst/videoparsers/gsth264parse.c	2012-02-15 19:36:25.000000000 -0500
+++ gst-plugins-bad-0.10.23/gst/videoparsers/gsth264parse.c	2016-12-22 12:53:33.215586242 -0500
@@ -1605,6 +1605,9 @@ gst_h264_parse_set_caps (GstBaseParse *
       off = nalu.offset + nalu.size;
     }
 
+    if (off >= size) {
+      goto avcc_too_small;
+    }
     num_pps = data[off];
     off++;
openSUSE Build Service is sponsored by