]> git.proxmox.com Git - mirror_lxc.git/commitdiff
confile_utils: fix integer comparisons
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Sep 2021 08:49:34 +0000 (10:49 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Sep 2021 11:01:42 +0000 (13:01 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile_utils.c

index 77627513c979b338403345d38d2f4eb7a8500f85..07aabd2de08fd1d3de5b1527b7e002ba35e1d7c9 100644 (file)
@@ -799,7 +799,7 @@ int lxc_get_conf_str(char *retv, int inlen, const char *value)
                return 0;
 
        value_len = strlen(value);
-       if (retv && inlen >= value_len + 1)
+       if (retv && (size_t)inlen >= value_len + 1)
                memcpy(retv, value, value_len + 1);
 
        return value_len;