Files
wxWidgets/tests/intl
dxbjavidandVadim Zeitlin 2647c0806f Fix buffer overflow when loading invalid message catalogs
Avoid integer overflow in message catalog StringAtOfs() bounds check:
StringAtOfs() read ofsString and nLen from the .mo file and checked
ofsString + nLen against the data length, but both are 32-bit so the
sum wraps and a translated entry declaring nLen 0xffffffff passes the
check; FillHash() then scans past the end of the catalog. Compute the
offset as a 64-bit value so the addition can't overflow and result in an
invalid index into the buffer.

Add a test feeding such a catalog through wxMsgCatalog::CreateFromData().

Closes #26513.
2026-05-30 17:04:10 +02:00
..