27 Star 20 Fork 72

openGauss / CM

 / 详情

strlen函数参数可能为NULL,会导致段错误的问题

已完成
任务
创建于  
2023-04-18 09:23

在/CM/src/cm_ctl/ctl_res_list.cpp中的144行左右存在如下代码

 resName = GetValueStrFromCJson(item, RES_NAME);   
        if (resName == NULL) {   
            resName = NULL;             
        } else {  
            isCanPrint = CM_TRUE;             
        }  
        info->resName.len = CM_MAX(info->resName.len, (uint32)strlen(resName));  

如果resName为NULL,则strlen(resName)的参数为NULL,会导致段错误问题。

评论 (2)

王虎 创建了任务

Hey @王虎, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.

Hi @王虎,
if you want to get quick review about your issue, please contact the owner in first: @yz ,
and then any of the maintainers: @zjxqxf , @wangwei5
and then any of the committers: @yz , @dengyong , @junhangis , @zhulixia , @cchen676 , @陈栋 , @wanghuanzhuo , @胡习林 , @peibaoyi
if you have any question, please contact the SIG: CM.

opengauss-bot 添加了
 
sig/cm
标签
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 修改了描述
王虎 任务状态待办的 修改为进行中
薛蒙恩 通过opengauss/CM Pull Request !121任务状态进行中 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5622128 opengauss bot 1581905080
1
https://gitee.com/opengauss/CM.git
git@gitee.com:opengauss/CM.git
opengauss
CM
CM

搜索帮助

53164aa7 5694891 3bd8fe86 5694891