1 Star 0 Fork 34

ultra_planet/wireshark

forked from src-openEuler/wireshark 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
wireshark-CVE-2018-19628.patch 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
gu-gu-gu 提交于 2019-12-02 20:44 . wireshark:openEuler init
From d53ff85d409367ee6538326147c8bb545bd4adb3 Mon Sep 17 00:00:00 2001
From: Gerald Combs <[email protected]>
Date: Tue, 27 Nov 2018 12:06:47 -0800
Subject: [PATCH] ZigBee ZCL: Fix a divide-by-zero.
Fix a divide-by-zero in decode_color_temperature.
Bug: 15281
Change-Id: I9460ffc85f6fe6b954c1810c3a80588c1aa4fec2
Reviewed-on: https://code.wireshark.org/review/30806
Reviewed-by: Gerald Combs <[email protected]>
Petri-Dish: Gerald Combs <[email protected]>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <[email protected]>
---
epan/dissectors/packet-zbee-zcl-lighting.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/epan/dissectors/packet-zbee-zcl-lighting.c b/epan/dissectors/packet-zbee-zcl-lighting.c
index 4a4fc5c..b68a003 100644
--- a/epan/dissectors/packet-zbee-zcl-lighting.c
+++ b/epan/dissectors/packet-zbee-zcl-lighting.c
@@ -879,7 +879,11 @@ decode_color_xy(gchar *s, guint16 value)
static void
decode_color_temperature(gchar *s, guint16 value)
{
- g_snprintf(s, ITEM_LABEL_LENGTH, "%d [Mired] (%d [K])", value, 1000000/value);
+ if (value == 0) {
+ g_snprintf(s, ITEM_LABEL_LENGTH, "%u [Mired]", value);
+ } else {
+ g_snprintf(s, ITEM_LABEL_LENGTH, "%u [Mired] (%u [K])", value, 1000000/value);
+ }
return;
} /*decode_power_conf_voltage*/
--
1.7.12.4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ultra_planet/wireshark.git
[email protected]:ultra_planet/wireshark.git
ultra_planet
wireshark
wireshark
master

搜索帮助