diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2015-07-21 18:26:09 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2015-07-21 20:07:34 +0200 |
commit | e00f5bddde0daff900cbd93e1ee0530ad1ae06ce (patch) | |
tree | 52a34a5c1d797812703feed77597c3259c88fb58 | |
parent | 0a327854f8613b7a52a80c1f3f8fc3100fb9df58 (diff) |
udev: fix crash with invalid udev.log-priority
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1245293
-rw-r--r-- | src/udev/udevd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 0661f7be00..f14efbe203 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1377,7 +1377,10 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { int prio; prio = util_log_priority(value); - log_set_max_level(prio); + if (prio < 0) + log_warning("invalid udev.log-priority ignored: %s", value); + else + log_set_max_level(prio); } else if (streq(key, "children-max")) { r = safe_atou(value, &arg_children_max); if (r < 0) |