summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-18 08:42:57 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-18 08:59:32 -0400
commita13ae2afd5feabe26f29c806f883d3c4b8fc31e2 (patch)
tree6883cb811e1502e4b414d56a00b641d70c17b008
parentb309fae2bc9a505fa9da0c0188b23108938d2998 (diff)
downloadrockbox-a13ae2afd5feabe26f29c806f883d3c4b8fc31e2.tar.gz
rockbox-a13ae2afd5feabe26f29c806f883d3c4b8fc31e2.zip
[COV] folder_select buffer overrun
Change-Id: I441e1fa13d3832b3b12e3f46f35ef63fb3c1de02
-rw-r--r--apps/gui/folder_select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/gui/folder_select.c b/apps/gui/folder_select.c
index e324e8649a..cef95e179e 100644
--- a/apps/gui/folder_select.c
+++ b/apps/gui/folder_select.c
@@ -516,7 +516,7 @@ static int select_paths(struct folder* root, const char* filenames)
516 516
517 sstr = lastfnp; 517 sstr = lastfnp;
518 lastfnp = fnp; 518 lastfnp = fnp;
519 if (len <= 0 || len > buflen) 519 if (len <= 0 || len + 1 >= buflen)
520 continue; 520 continue;
521 strlcpy(buf, sstr, len + 1); 521 strlcpy(buf, sstr, len + 1);
522 struct child *item = find_from_filename(buf, root); 522 struct child *item = find_from_filename(buf, root);