From 22c0d8483a76be2f90a3836bc1a798fa7beccb56 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 3 Jan 2026 18:37:57 +0100 Subject: [PATCH] Silence another warning Signed-off-by: falkTX --- distrho/extra/sofd/libsofd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distrho/extra/sofd/libsofd.c b/distrho/extra/sofd/libsofd.c index 6aaeb689..7e0ca240 100644 --- a/distrho/extra/sofd/libsofd.c +++ b/distrho/extra/sofd/libsofd.c @@ -307,10 +307,10 @@ const char *x_fib_recent_at (unsigned int i) { #endif const char *x_fib_recent_file(const char *appname) { - static char recent_file[1024]; + static char recent_file[2048]; assert(!strchr(appname, '/')); const char *xdg = getenv("XDG_DATA_HOME"); - if (xdg && (strlen(xdg) + strlen(appname) + 10) < sizeof(recent_file)) { + if (xdg && (strlen(xdg) + strlen(appname) + 10 + sizeof(recent_file) / 2) < sizeof(recent_file)) { sprintf(recent_file, "%s" PATHSEP "%s" PATHSEP "recent", xdg, appname); return recent_file; } @@ -329,7 +329,7 @@ const char *x_fib_recent_file(const char *appname) { } #else const char *home = getenv("HOME"); - if (home && (strlen(home) + strlen(appname) + 22) < sizeof(recent_file)) { + if (home && (strlen(home) + strlen(appname) + 22 + sizeof(recent_file) / 2) < sizeof(recent_file)) { sprintf(recent_file, "%s/.local/share/%s/recent", home, appname); return recent_file; }