We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK中发送事件模块中,存在事件数组访问越界问题;
ad140-release_v1.4.0 以及之前的版本 ac104n-release_v1.4.0 以及之前的版本 ad150-release_v1.4.0 以及之前的版本
1.修改 msg.c 中 post_event 函数
int post_event(int event) { if (event >= ARRAY_SIZE(event2msg)) { return MSG_NOT_EVENT; } CPU_SR_ALLOC(); OS_ENTER_CRITICAL(); event_buf[event / 32] |= BIT(event % 32); OS_EXIT_CRITICAL(); return MSG_NO_ERROR; }
2.修改 msg.c 中 clear_one_event函数
static void clear_one_event(u32 event) { if(event >= (8*sizeof(event_buf))){ return; } CPU_SR_ALLOC(); OS_ENTER_CRITICAL(); event_buf[event / 32] &= ~BIT(event % 32); OS_EXIT_CRITICAL(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一、简介
SDK中发送事件模块中,存在事件数组访问越界问题;
二、涉及SDK版本
ad140-release_v1.4.0 以及之前的版本
ac104n-release_v1.4.0 以及之前的版本
ad150-release_v1.4.0 以及之前的版本
三、解决办法
1.修改 msg.c 中 post_event 函数
![屏幕截图 输入图片说明](https://camo.githubusercontent.com/eb679871b52e4acedb8e64c83ace0255bacc17b2a405a3a57748bd80f951fe3d/68747470733a2f2f666f727564612e67697465652e636f6d2f696d616765732f313637313432313034363832333133313037302f32643033626662655f31303932393138352e706e67)
2.修改 msg.c 中 clear_one_event函数
![屏幕截图 输入图片说明](https://camo.githubusercontent.com/f68c8cd8db469dd45853f88f5bfefbb3bd5701df4bb47449b2720e9ff4fe40a7/68747470733a2f2f666f727564612e67697465652e636f6d2f696d616765732f313637313432313134363430303133393234332f61303236373132325f31303932393138352e706e67)
The text was updated successfully, but these errors were encountered: