perl/Module-Build-Tiny: update to 0.051 for Perl 5.36 and 5.38
[oi-userland.git] / components / multimedia / gst-plugins-base / patches / 02-CVE-2017-5837.patch
blob64aada4dd1169a59b71cfe8a340eb78158e5e603
1 From 81d3ba3fa212bb25fe2ac661993887c4b69af6f1 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
3 Date: Sun, 15 Jan 2017 18:31:56 +0100
4 Subject: [PATCH] riff-media: Check for valid channels/rate before using the
5 values
7 Otherwise we might divide by zero or otherwise create invalid caps.
9 https://bugzilla.gnome.org/show_bug.cgi?id=777262
10 ---
11 gst-libs/gst/riff/riff-media.c | 6 ++++--
12 1 file changed, 4 insertions(+), 2 deletions(-)
14 Index: gst-plugins-base0.10-0.10.36/gst-libs/gst/riff/riff-media.c
15 ===================================================================
16 --- gst-plugins-base0.10-0.10.36.orig/gst-libs/gst/riff/riff-media.c 2017-03-23 13:06:30.955651882 -0400
17 +++ gst-plugins-base0.10-0.10.36/gst-libs/gst/riff/riff-media.c 2017-03-23 13:06:30.951651834 -0400
18 @@ -1495,7 +1495,8 @@
19 subformat_guid[2] == 0xaa000080 && subformat_guid[3] == 0x719b3800) {
20 if (subformat_guid[0] == 0x00000001) {
21 GST_DEBUG ("PCM");
22 - if (strf != NULL) {
23 + if (strf != NULL && strf->blockalign != 0 && strf->channels != 0
24 + && strf->rate != 0) {
25 gint ba = strf->blockalign;
26 gint wd = ba * 8 / strf->channels;
27 gint ws;
28 @@ -1541,7 +1542,8 @@
30 } else if (subformat_guid[0] == 0x00000003) {
31 GST_DEBUG ("FLOAT");
32 - if (strf != NULL) {
33 + if (strf != NULL && strf->blockalign != 0 && strf->channels != 0
34 + && strf->rate != 0) {
35 gint ba = strf->blockalign;
36 gint wd = ba * 8 / strf->channels;