1 Star 0 Fork 34

王记棒棒猪/wireshark

forked from src-openEuler/wireshark 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
wireshark-CVE-2019-5718.patch 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
gu-gu-gu 提交于 2019-12-02 20:44 +08:00 . wireshark:openEuler init
From cd09cb5cfb673beca3cce20b1d6a9bc67a134ae1 Mon Sep 17 00:00:00 2001
From: Gerald Combs <[email protected]>
Date: Mon, 7 Jan 2019 14:41:29 -0800
Subject: [PATCH] epan: Add a boundary check to get_t61_string.
Add a boundary check to make sure we don't go past the end of "ptr".
Bug: 15373
Change-Id: I85394e8e6e477b47919362af146051cc8911254b
Reviewed-on: https://code.wireshark.org/review/31440
Reviewed-by: Gerald Combs <[email protected]>
---
epan/charsets.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/epan/charsets.c b/epan/charsets.c
index 7f298fd..ebeb2dc 100644
--- a/epan/charsets.c
+++ b/epan/charsets.c
@@ -1382,7 +1382,7 @@ get_t61_string(wmem_allocator_t *scope, const guint8 *ptr, gint length)
for (i = 0, c = ptr; i < length; c++, i++) {
if (!t61_tab[*c]) {
wmem_strbuf_append_unichar(strbuf, UNREPL);
- } else if ((*c & 0xf0) == 0xc0) {
+ } else if (i < length - 1 && (*c & 0xf0) == 0xc0) {
gint j = *c & 0x0f;
/* If this is the end of the string, or if the base
* character is just a space, treat this as a regular
--
2.7.4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhu-yuncheng/wireshark.git
[email protected]:zhu-yuncheng/wireshark.git
zhu-yuncheng
wireshark
wireshark
master

搜索帮助