Skip to content

Testcase and fix for unicodeToAscii7() underallocation bug

This is an alternative solution to the one proposed in !327 (merged) (which uses a len * 8 allocation size).

This MR's keeps using a len * 2 allocation size, but now in a safe manner as we cap each converted Unicode char to a maximum of 2 ascii chars (which is good enough for our needs wrt text search functionality).

Includes a testcase which reproduces the bug.

Merge request reports