chiark / gitweb /
Reject invalid quoted strings
[elogind.git] / src / cryptsetup / cryptsetup.c
index 67dc88fa515c37a02eef4d366badac4399a35203..94570eb82d07ac9b836907d86b8cadfb34305176 100644 (file)
@@ -175,16 +175,16 @@ static int parse_one_option(const char *option) {
 }
 
 static int parse_options(const char *options) {
-        char *state, *w;
+        const char *word, *state;
         size_t l;
         int r;
 
         assert(options);
 
-        FOREACH_WORD_SEPARATOR(w, l, options, ",", state) {
+        FOREACH_WORD_SEPARATOR(word, l, options, ",", state) {
                 _cleanup_free_ char *o;
 
-                o = strndup(w, l);
+                o = strndup(word, l);
                 if (!o)
                         return -ENOMEM;
                 r = parse_one_option(o);