]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: fix crash with invalid udev.log-priority
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 21 Jul 2015 16:26:09 +0000 (18:26 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Tue, 21 Jul 2015 18:07:34 +0000 (20:07 +0200)
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1245293
src/udev/udevd.c

index 0661f7be00fc50c3d62643e572c48816342ba1e1..f14efbe20350ab0bdcf44c9454a6be5db6891d89 100644 (file)
@@ -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)