]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/log.c
Reject invalid quoted strings
[thirdparty/systemd.git] / src / shared / log.c
index 3941e3e1c202d0015b42e9ebff3a93174003efb0..a7c3195f3923680efaa88e5131ccca5724780e1d 100644 (file)
@@ -871,11 +871,11 @@ void log_parse_environment(void) {
         if (r < 0)
                 log_warning("Failed to read /proc/cmdline. Ignoring: %s", strerror(-r));
         else if (r > 0) {
-                char *w, *state;
+                const char *word, *state;
                 size_t l;
 
-                FOREACH_WORD_QUOTED(w, l, line, state) {
-                        if (l == 5 && startswith(w, "debug")) {
+                FOREACH_WORD_QUOTED(word, l, line, state) {
+                        if (l == 5 && startswith(word, "debug")) {
                                 log_set_max_level(LOG_DEBUG);
                                 break;
                         }