Files
wxWidgets/tests
dxbjavid 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
..
2025-09-01 15:23:25 +02:00
2026-01-25 22:08:21 +01:00
2025-09-02 19:24:40 -04:00
2026-05-27 16:17:21 +02:00
2026-05-19 03:01:39 +02:00

Tests

This directory contains tests for the library and is mostly useful for the library developers. See the samples subdirectory for the examples that are more useful to the application developers using the library.

If you do work on the library itself and would like to modify an existing or add a new test, please see docs/contributing/how-to-write-unit-tests.md for more information.

This file also contains the instructions for running the tests if you'd just like to do it to confirm that the library works correctly.