From 8abe8558e3cc8f8f53e50c718f5f653916cc2fac Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Fri, 21 Jun 2019 17:47:40 +0200 Subject: [PATCH] Allow more space for persistent type directory names Signed-off-by: Sebastien GODARD --- common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.c b/common.c index 288211b..d3c1c8d 100644 --- a/common.c +++ b/common.c @@ -768,9 +768,9 @@ char *strtolower(char *str) */ char *get_persistent_type_dir(char *type) { - static char dir[32]; + static char dir[PATH_MAX]; - snprintf(dir, 32, "%s-%s", DEV_DISK_BY, type); + snprintf(dir, sizeof(dir), "%s-%s", DEV_DISK_BY, type); if (access(dir, R_OK)) { return (NULL); -- 2.40.0