[systemd-devel] [PATCH] systemd crashes if locale.conf contains invalid utf8 string
zbyszek at in.waw.pl
Sat Feb 8 10:15:49 PST 2014
On Thu, Feb 06, 2014 at 07:09:59PM +0100, Goffredo Baroncelli wrote:
> In the parse_env_file_push() and load_env_file_push() functions, there
> are two assert() call to check if the key or value parameters are utf8 valid.
> If the strings aren't utf8 valid, assert does abort.
> These function are used early by systemd to parse some files. For
> example '/etc/locale.conf'. In my case this file contained a not utf8
> sequence, which is bad, but systemd crashed during the boot, which
> is even worse !
Your patch motivated me to push a patch I had written previously to avoid
invalid utf-8 in log messages. After those two changes systemd should
finally behave correctly for invalid utf-8 in config files.
More information about the systemd-devel