代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/net-snmp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 277d75633d8008cde468d026694289ca32f2cb6d Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bvanassche@acm.org>
Date: Thu, 26 Aug 2021 10:17:11 -0700
Subject: [PATCH] libsnmp: Fix undefined behavior in asn_build_int()
According to the C standard, triggering an overflow by shifting a signed
integer results in undefined behavior. Fix this by inserting a cast.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37579
---
snmplib/asn1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/snmplib/asn1.c b/snmplib/asn1.c
index d5d7eb6..959ae21 100644
--- a/snmplib/asn1.c
+++ b/snmplib/asn1.c
@@ -784,7 +784,7 @@ asn_build_int(u_char * data,
*/
while (intsize--) {
*data++ = (u_char) ((integer & mask) >> (8 * (sizeof(long) - 1)));
- integer <<= 8;
+ integer = (u_long)integer << 8;
}
DEBUGDUMPSETUP("send", initdatap, data - initdatap);
DEBUGMSG(("dumpv_send", " Integer:\t%ld (0x%.2lX)\n", *intp, *intp));
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。