#include "pager.h"
#include "set.h"
#include "path-util.h"
+#include "utf8.h"
static bool arg_no_pager = false;
static enum transport {
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();
}
static int add_locales_from_libdir (Set *locales) {
- DIR _cleanup_closedir_ *dir;
+ _cleanup_closedir_ DIR *dir;
struct dirent *entry;
int r;
}
static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) {
- char _cleanup_strv_free_ **l = NULL;
+ _cleanup_strv_free_ char **l = NULL;
keymaps = set_new(string_hash_func, string_compare_func);
if (!keymaps)
static int list_x11_keymaps(DBusConnection *bus, char **args, unsigned n) {
_cleanup_fclose_ FILE *f = NULL;
- char _cleanup_strv_free_ **list = NULL;
+ _cleanup_strv_free_ char **list = NULL;
char line[LINE_MAX];
enum {
NONE,
return -EINVAL;
}
- f = fopen("/usr/share/X11/xkb/rules/xorg.lst", "re");
+ f = fopen("/usr/share/X11/xkb/rules/base.lst", "re");
if (!f) {
log_error("Failed to open keyboard mapping list. %m");
return -errno;