21 Oct
2024
21 Oct
'24
2:46 p.m.
On Tue Jul 30 18:07:42 2024 +0000, Alfred Agrell wrote:
I'm nor aware of this kind of stuff causing any trouble in practice, but I agree with fixing it anyways. Creating a two-or-more-past-the-end pointer is UB. I also agree with refactoring the bounds check into a function instead of having five different copies. (The last two are TOOLBAR_GetButton and TOOLBAR_SetCmdId, which are correct, but still duplicate.) Finally, I strongly suspect TOOLBAR_GetCheckedGroupButtonIndex contains a similar bug. I suspect the > should be >=. @zhiyi, how do you like offer from @Alcaro?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6169#note_85601