8 Star 0 Fork 26

src-anolis-os/binutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
binutils-CVE-2018-12699-part6-PR28862.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
# Commit 481153777e278b71e694fd2db6b897f7a9e3dcb8 fixing PR 28862
#
# From: Alan Modra <amodra@gmail.com>
#
# I have no info on the format of a "SUNPRO C++ Namespace" stab, so am
# relying on the previous code being correct in parsing these stabs.
# Just don't allow NULs anywhere in the stab.
#
# PR 28862
# * stabs.c (parse_stab_string): Don't overrun buffer when parsing
# 'Y' stab.
--- binutils.orig/binutils/stabs.c 2024-11-06 17:39:57.460250962 +0000
+++ binutils-2.30/binutils/stabs.c 2024-11-06 17:41:32.293848603 +0000
@@ -1138,15 +1138,13 @@ parse_stab_string (void *dhandle, struct
case 'Y':
/* SUNPro C++ Namespace =Yn0. */
/* Skip the namespace mapping, as it is not used now. */
- if (*(++p) == 'n' && *(++p) == '0')
+ if (*p++ != 0 && *p++ == 'n' && *p++ == '0')
{
/* =Yn0name; */
- while (*p != ';')
+ while (*p && *p != ';')
++p;
- ++p;
- /* There is a potential resource leak here, but it is not important. */
- /* coverity[leaked_storage: FALSE] */
- return TRUE;
+ if (*p)
+ return TRUE;
}
/* TODO SUNPro C++ support:
Support default arguments after F,P parameters
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/binutils.git
git@gitee.com:src-anolis-os/binutils.git
src-anolis-os
binutils
binutils
a8

搜索帮助