diff options
Diffstat (limited to 'src/locale/localectl.c')
-rw-r--r-- | src/locale/localectl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/locale/localectl.c b/src/locale/localectl.c index 5328ac41a5..095d7f7d3f 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -37,6 +37,7 @@ #include "pager.h" #include "set.h" #include "path-util.h" +#include "utf8.h" static bool arg_no_pager = false; static enum transport { @@ -359,6 +360,9 @@ static int add_locales_from_archive(Set *locales) { if (e[i].locrec_offset == 0) continue; + if (!utf8_is_valid((char*) p + e[i].name_offset)) + continue; + z = strdup((char*) p + e[i].name_offset); if (!z) { r = log_oom(); |