[PATCH 1/2] config: fix value trunction when reading int64 configurations

Ming-Hung Tsai <[email protected]> Mon, 17 Mar 2025 15:51:24 +0800
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
Use int64_t to prevent truncation of the parsed value.

Signed-off-by: Ming-Hung Tsai <[email protected]>
---
 lib/config/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/config/config.c b/lib/config/config.c
index 53d6fc9a06ca..9df9c925c152 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1372,7 +1372,7 @@ int64_t find_config_tree_int64(struct cmd_context *cmd, int id, struct profile *
 	const cfg_def_item_t *item = cfg_def_get_item_p(id);
 	char path[CFG_PATH_MAX_LEN];
 	int profile_applied;
-	int i64;
+	int64_t i64;
 
 	profile_applied = _apply_local_profile(cmd, profile);
 	_cfg_def_make_path(path, sizeof(path), item->id, item, 0);
-- 
2.47.0