From 85d49873a659fdcf50f6ac487e14eddcdeb1776c Mon Sep 17 00:00:00 2001 From: Felix Abecassis Date: Fri, 13 Jul 2018 16:45:55 -0700 Subject: [PATCH] confile: fix incorrect strncmp Passing additional configuration options with "--define" was broken. Result of git bisect: d899f11b7bfb14c4b532bc801de89c8fb46307d4 is the first bad commit Signed-off-by: Felix Abecassis --- src/lxc/confile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 4365264e9..d6eacf33b 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2402,7 +2402,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;