提交 db384647 编写于 作者: O openharmony_ci 提交者: Gitee

!282 fix: 修复MagicKey数组越界访问

Merge pull request !282 from MGY917/master
......@@ -143,8 +143,8 @@ INT32 CheckMagicKey(CHAR key)
}
if (magicKeySwitch != 0) {
for (i = 0; g_magicOpTable[i] != NULL; ++i) {
if (key == g_magicOpTable[i]->magicKey) {
for (i = 0; i < MAGIC_KEY_NUM; i++) {
if (g_magicOpTable[i] != NULL && key == g_magicOpTable[i]->magicKey) {
(g_magicOpTable[i])->opHandler();
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册