1 Star 0 Fork 8

liuyumeng/gstreamer-plugins-base

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2017-5837.patch 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
AlexZ11 提交于 2019-11-28 20:36 . gstreamer-plugins-base:initialize
From 81d3ba3fa212bb25fe2ac661993887c4b69af6f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <[email protected]>
Date: Sun, 15 Jan 2017 18:31:56 +0100
Subject: [PATCH] riff-media: Check for valid channels/rate before using the
values
Otherwise we might divide by zero or otherwise create invalid caps.
https://bugzilla.gnome.org/show_bug.cgi?id=777262
---
gst-libs/gst/riff/riff-media.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index 7a83226223..328036df80 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -1615,7 +1615,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
subformat_guid[2] == 0xaa000080 && subformat_guid[3] == 0x719b3800) {
if (subformat_guid[0] == 0x00000001) {
GST_DEBUG ("PCM");
- if (strf != NULL) {
+ if (strf != NULL && strf->blockalign != 0 && strf->channels != 0
+ && strf->rate != 0) {
gint ba = strf->blockalign;
gint wd = ba * 8 / strf->channels;
gint ws;
@@ -1648,7 +1649,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
}
} else if (subformat_guid[0] == 0x00000003) {
GST_DEBUG ("FLOAT");
- if (strf != NULL) {
+ if (strf != NULL && strf->blockalign != 0 && strf->channels != 0
+ && strf->rate != 0) {
gint ba = strf->blockalign;
gint wd = ba * 8 / strf->channels;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liuyumeng1/gstreamer-plugins-base.git
[email protected]:liuyumeng1/gstreamer-plugins-base.git
liuyumeng1
gstreamer-plugins-base
gstreamer-plugins-base
master

搜索帮助