2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 20:39:33 +00:00

confile_utils: fix integer comparisons

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner
2021-09-03 10:49:34 +02:00
parent 5eac34d508
commit 6c7c4a01ab

View File

@@ -799,7 +799,7 @@ int lxc_get_conf_str(char *retv, int inlen, const char *value)
return 0; return 0;
value_len = strlen(value); value_len = strlen(value);
if (retv && inlen >= value_len + 1) if (retv && (size_t)inlen >= value_len + 1)
memcpy(retv, value, value_len + 1); memcpy(retv, value, value_len + 1);
return value_len; return value_len;