From a3ef7b73b8b1a368596bad68075ef180127410ac Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 11 Dec 2024 19:17:08 -0500 Subject: [PATCH] [Bugfix?] tagtree build_firstletter_menu dst src overlap pretty sure this is a false positive by gcc but we know what we expect to recieve so add a small buffer to shut gcc up Change-Id: Ibbd7c995ec2f0ade4bfbcb1d659f1cae5d4f1de3 --- apps/tagtree.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/tagtree.c b/apps/tagtree.c index 60f8a795e3..de014b008d 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1082,10 +1082,15 @@ static bool alloc_menu_parse_buf(char *buf, int type) static void build_firstletter_menu(char *buf, size_t bufsz) { +#if 0 /* GCC complains about this I can't find a definitive answer */ const char *subitem = buf; size_t l = strlen(buf) + 1; buf+=l; bufsz-=l; +#else + char subitem[32]; /* canonicalartist longest subitem we expect add a bit extra..*/ + strmemccpy(subitem, buf, sizeof(subitem)); +#endif const char * const fmt ="\"%s\"-> %s ? %s %c\"%c\"-> %s =\"fmt_title\""; const char * const showsub = /* album subitem for canonicalartist */