summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-07-21 18:26:09 +0200
committerMichal Schmidt <mschmidt@redhat.com>2015-07-21 20:07:34 +0200
commite00f5bddde0daff900cbd93e1ee0530ad1ae06ce (patch)
tree52a34a5c1d797812703feed77597c3259c88fb58 /src/udev
parent0a327854f8613b7a52a80c1f3f8fc3100fb9df58 (diff)
udev: fix crash with invalid udev.log-priority
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1245293
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udevd.c5
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)