“739b2ba51cb0704d2ae11b714080b45c54e2afcf”上不存在“bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src/main.c”
未验证 提交 86e1b421 编写于 作者: C cheng_jinsong 提交者: Gitee

bootevent strcmp地址越界问题

Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
上级 00881a25
...@@ -35,6 +35,9 @@ static ListNode bootEventList = {&bootEventList, &bootEventList}; ...@@ -35,6 +35,9 @@ static ListNode bootEventList = {&bootEventList, &bootEventList};
static int BootEventParaListCompareProc(ListNode *node, void *data) static int BootEventParaListCompareProc(ListNode *node, void *data)
{ {
BOOT_EVENT_PARAM_ITEM *item = (BOOT_EVENT_PARAM_ITEM *)node; BOOT_EVENT_PARAM_ITEM *item = (BOOT_EVENT_PARAM_ITEM *)node;
if (strncmp(item->paramName, BOOT_EVENT_PARA_PREFIX, BOOT_EVENT_PARA_PREFIX_LEN) != 0) {
return -1;
}
if (strcmp(item->paramName + BOOT_EVENT_PARA_PREFIX_LEN, (const char *)data) == 0) { if (strcmp(item->paramName + BOOT_EVENT_PARA_PREFIX_LEN, (const char *)data) == 0) {
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册