Fix utils_get_initials() reading past the end of the input string if that string was empty.
Also fix support for non-ASCII initials for which the UTF-8 character representation would have been truncated to the first byte only, leading to an invalid value.
The implementation here also tries to handle combining accents, although that part might not be really solid.
Fixes #3844.
---
This might get a bit over-the-top with the support for non-composable combining marks, but well, now it's there? :) You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3846
-- Commit Summary --
* Fix invalid memory access and Unicode support in utils_get_initials()
-- File Changes --
M src/utils.c (42) M tests/test_utils.c (23)
-- Patch Links --
https://github.com/geany/geany/pull/3846.patch https://github.com/geany/geany/pull/3846.diff