41 Star 174 Fork 206

OpenHarmony / drivers_framework

 / 详情

strcmp输入参数可能存在空指针导致异常。

Done
Bug
Opened this issue  
2021-11-30 18:49

【任务描述】
strcmp输入参数可能存在空指针导致异常。
drivers\framework\support\platform\src\pin\pin_core.c
static int32_t GetPinIndex(struct PinCntlr *cntlr, struct PinDesc *desc)
{
xxxx
ret = strcmp(cntlr->pins[index].pinName, desc->pinName);
xxxx
}
【解决方案】
if (desc->pinName == NULL) {
HDF_LOGE("%s: desc->pinName is NULL!", func);
return HDF_ERR_INVALID_PARAM;
}
【任务来源】
调用代码发现。

Comments (0)

zhangweimin24026 created缺陷
kevin changed issue state from 待办的 to 已确认
kevin set assignee to NickYang
NickYang assigned collaborator 贾子扬
zhangweimin24026 throughopenharmony/drivers_framework Pull Request !456 changed issue state from 已确认 to 已完成
Expand operation logs

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
参与者(2)
9171823 jia ziyang1 1637632000
1
https://git.oschina.net/openharmony/drivers_framework.git
git@git.oschina.net:openharmony/drivers_framework.git
openharmony
drivers_framework
drivers_framework

Search