chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ef2af5
)
localctl: skip locale entries with non-UTF8 names
author
Lennart Poettering
<lennart@poettering.net>
Wed, 10 Apr 2013 21:21:53 +0000
(23:21 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 10 Apr 2013 21:23:19 +0000
(23:23 +0200)
glibc should place these in the locale archive. For now, let's just skip
them from our output, since they are aliases anyway.
https://bugs.freedesktop.org/show_bug.cgi?id=63389
src/locale/localectl.c
patch
|
blob
|
history
diff --git
a/src/locale/localectl.c
b/src/locale/localectl.c
index 5328ac41a5b704d289d40da338d5a81d35307602..095d7f7d3f7184dea82f48f32685a0628e06c48d 100644
(file)
--- 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();