Skip to content
New issue

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

bug(core): debug lists may not be properly terminated for failure paths in kmx processor #10962

Open
mcdurdin opened this issue Mar 7, 2024 · 0 comments
Assignees
Labels
bug core/ Keyman Core
Milestone

Comments

@mcdurdin
Copy link
Member

mcdurdin commented Mar 7, 2024

Coming out of #10919.

For example, the debug list is not terminated in this situation:

if (kbd->StartGroup[BEGIN_UNICODE] == (KMX_DWORD) -1) {
DebugLog("Non-Unicode keyboards are not supported.");
m_core_state = nullptr;
return FALSE;
}

The debug list is initialized immediately above:

state->debug_items().clear();
if(state->debug_items().is_enabled()) {
CreateInternalDebugItems();
} else {
// We want to have a clean debug state even if it is not in use
state->debug_items().push_end(m_actions.Length(), 0);
}

In most cases, a failure path would not have the consumer reading the debug list, but a separate bug documented in #10915 shows how this is still not right at present, and it does lead to crashes in those scenarios due to running off the end of the list.

@keymanapp-test-bot keymanapp-test-bot bot added bug core/ Keyman Core labels Mar 7, 2024
@mcdurdin mcdurdin changed the title bug(core): debug lists may not be properly terminated for unhandled keys in kmx processor bug(core): debug lists may not be properly terminated for failure paths in kmx processor Mar 7, 2024
@mcdurdin mcdurdin added this to the 18.0 milestone Mar 7, 2024
@mcdurdin mcdurdin modified the milestones: 18.0, A18S6 Apr 29, 2024
@darcywong00 darcywong00 modified the milestones: A18S6, A18S7 Jul 19, 2024
@darcywong00 darcywong00 modified the milestones: A18S7, A18S8 Aug 2, 2024
@darcywong00 darcywong00 modified the milestones: A18S8, A18S9 Aug 17, 2024
@mcdurdin mcdurdin added this to Keyman Aug 19, 2024
@ermshiperete ermshiperete moved this to Todo in Keyman Aug 19, 2024
@ermshiperete ermshiperete modified the milestones: A18S9, A18S22 Aug 19, 2024
@ermshiperete ermshiperete modified the milestones: A18S22, 19.0 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core/ Keyman Core
Projects
Status: Todo
Development

No branches or pull requests

3 participants