summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch')
-rw-r--r--external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch b/external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch
new file mode 100644
index 00000000..235acda8
--- /dev/null
+++ b/external/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-bad/buffer-overflow-mp4.patch
@@ -0,0 +1,36 @@
+Description: Fix buffer overflow in mp4 parsing
+Author: Ralph Giles <giles@mozilla.com>
+---
+Backport patch from debian to fix CVE-2015-0797.
+https://sources.debian.net/data/main/g/gst-plugins-bad0.10/0.10.23-7.1+deb7u2/debian/patches/buffer-overflow-mp4.patch
+
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+--- gst-plugins-bad0.10-0.10.23.orig/gst/videoparsers/gsth264parse.c
++++ gst-plugins-bad0.10-0.10.23/gst/videoparsers/gsth264parse.c
+@@ -384,6 +384,11 @@ gst_h264_parse_wrap_nal (GstH264Parse *
+
+ GST_DEBUG_OBJECT (h264parse, "nal length %d", size);
+
++ if (size > G_MAXUINT32 - nl) {
++ GST_ELEMENT_ERROR (h264parse, STREAM, FAILED, (NULL),
++ ("overflow in nal size"));
++ return NULL;
++ }
+ buf = gst_buffer_new_and_alloc (size + nl + 4);
+ if (format == GST_H264_PARSE_FORMAT_AVC) {
+ GST_WRITE_UINT32_BE (GST_BUFFER_DATA (buf), size << (32 - 8 * nl));
+@@ -452,6 +457,11 @@ gst_h264_parse_process_nal (GstH264Parse
+ GST_DEBUG_OBJECT (h264parse, "not processing nal size %u", nalu->size);
+ return;
+ }
++ if (G_UNLIKELY (nalu->size > 20 * 1024 * 1024)) {
++ GST_DEBUG_OBJECT (h264parse, "not processing nal size %u (too big)",
++ nalu->size);
++ return;
++ }
+
+ /* we have a peek as well */
+ nal_type = nalu->type;