]> git.proxmox.com Git - mirror_lxc.git/commitdiff
confile: fix incorrect strncmp
authorFelix Abecassis <fabecassis@nvidia.com>
Fri, 13 Jul 2018 23:45:55 +0000 (16:45 -0700)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 24 Jul 2018 12:58:59 +0000 (14:58 +0200)
Passing additional configuration options with "--define" was broken.

Result of git bisect:
d899f11b7bfb14c4b532bc801de89c8fb46307d4 is the first bad commit

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
src/lxc/confile.c

index 91c395385f3c467005d98ff7fd6928c66eaaad59..f854ecaf65efac00fe5799e062615b9db8b11100 100644 (file)
@@ -2388,7 +2388,7 @@ static struct new_config_item *parse_new_conf_line(char *buffer)
        line += lxc_char_left_gc(line, strlen(line));
 
        /* martian option - don't add it to the config itself */
-       if (strncmp(line, "lxc.", strlen(line)))
+       if (strncmp(line, "lxc.", 4))
                goto on_error;
 
        ret = -1;