10 Mar
2023
10 Mar
'23
8:04 p.m.
Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_com_client.c:
+ *out_length = element_arr->elements_count; + + return S_OK; +} + +static HRESULT WINAPI uia_element_array_GetElement(IUIAutomationElementArray *iface, int idx, + IUIAutomationElement **out_elem) +{ + struct uia_element_array *element_arr = impl_from_IUIAutomationElementArray(iface); + + TRACE("%p, %p\n", iface, out_elem); + + if (!out_elem) + return E_POINTER; + + if (idx >= element_arr->elements_count) idx is signed so it should be checked for negative values too.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2352#note_26655