1 Star 0 Fork 8

孟文华/sox

forked from src-openEuler/sox 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sox-14.4.2-bug_1500570_fix.patch 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
Grooooot 提交于 2019-12-17 16:13 . package init
From 818bdd0ccc1e5b6cae742c740c17fd414935cf39 Mon Sep 17 00:00:00 2001
From: Mans Rullgard <[email protected]>
Date: Sun, 5 Nov 2017 15:57:48 +0000
Subject: [PATCH] flac: fix crash on corrupt metadata (CVE-2017-15371)
---
src/flac.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: sox/src/flac.c
===================================================================
--- sox.orig/src/flac.c
+++ sox/src/flac.c
@@ -119,9 +119,10 @@ static void decoder_metadata_callback(FL
p->total_samples = metadata->data.stream_info.total_samples;
}
else if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
+ const FLAC__StreamMetadata_VorbisComment *vc = &metadata->data.vorbis_comment;
size_t i;
- if (metadata->data.vorbis_comment.num_comments == 0)
+ if (vc->num_comments == 0)
return;
if (ft->oob.comments != NULL) {
@@ -129,8 +130,9 @@ static void decoder_metadata_callback(FL
return;
}
- for (i = 0; i < metadata->data.vorbis_comment.num_comments; ++i)
- sox_append_comment(&ft->oob.comments, (char const *) metadata->data.vorbis_comment.comments[i].entry);
+ for (i = 0; i < vc->num_comments; ++i)
+ if (vc->comments[i].entry)
+ sox_append_comment(&ft->oob.comments, (char const *) vc->comments[i].entry);
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/meng-wenhua/sox.git
[email protected]:meng-wenhua/sox.git
meng-wenhua
sox
sox
master

搜索帮助