From: Tom Hromatka Date: Wed, 6 Jul 2022 20:25:51 +0000 (-0600) Subject: config: Fix bad cherry-pick X-Git-Tag: v2.0.3~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0664422e55da5a4dca00b7a215d883e3c1e240d8;p=thirdparty%2Flibcgroup.git config: Fix bad cherry-pick CONTROL_NAMELEN_MAX doesn't exist in the release-2.0 branch and instead FILENAME_MAX should be used. Fixes: a3aab924ab0b "config: cgroup_config_insert_into_mount_table() use strncpy()" Signed-off-by: Tom Hromatka --- diff --git a/src/config.c b/src/config.c index 01490f6a..774f0d70 100644 --- a/src/config.c +++ b/src/config.c @@ -570,8 +570,8 @@ int cgroup_config_insert_into_mount_table(char *name, char *mount_point) } strncpy(config_mount_table[config_table_index].name, name, - CONTROL_NAMELEN_MAX - 1); - config_mount_table[config_table_index].name[CONTROL_NAMELEN_MAX - 1] = + FILENAME_MAX - 1); + config_mount_table[config_table_index].name[FILENAME_MAX - 1] = '\0'; strncpy(config_mount_table[config_table_index].mount.path, mount_point,