wxArray::operator[] doesn't check the index any more in 3.3 (Issue #26149)

18 views
Skip to first unread message

VZ

unread,
Feb 2, 2026, 6:27:58 AM (3 days ago) Feb 2
to wx-...@googlegroups.com, Subscribed
vadz created an issue (wxWidgets/wxWidgets#26149)

It's probably worth restoring the assert for index validity as the alternative is not crashing (which would have been at least somewhat acceptable) but, at least sometimes, silently reading out of bounds memory, as shown by #26148.

Ideal would be to stop using [] (except in loops where index validity is guaranteed — but which should be replaced by range-based for loops and so not use any indices at all) and use at(), but this is probably not going to happen.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26149@github.com>

VZ

unread,
Feb 4, 2026, 5:04:35 PM (20 hours ago) Feb 4
to wx-...@googlegroups.com, Subscribed

Closed #26149 as completed via 01b5b06.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/26149/issue_event/22541650843@github.com>

Reply all
Reply to author
Forward
0 new messages