summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-12-11 19:17:08 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2024-12-11 19:19:30 -0500
commita3ef7b73b8b1a368596bad68075ef180127410ac (patch)
tree37c51bb5482c0fa4455f9c7b203d571718f75d85
parentc3fad3782716392cc8a51f61fb5d74a73120d0f0 (diff)
downloadrockbox-a3ef7b73b8.tar.gz
rockbox-a3ef7b73b8.zip
[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
-rw-r--r--apps/tagtree.c5
1 files changed, 5 insertions, 0 deletions
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 */