From: Felix Abecassis Date: Fri, 13 Jul 2018 23:45:55 +0000 (-0700) Subject: confile: fix incorrect strncmp X-Git-Tag: lxc-3.1.0~208^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85d49873a659fdcf50f6ac487e14eddcdeb1776c;p=thirdparty%2Flxc.git 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 --- 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;