summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-06-05 23:38:25 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-06-05 23:38:25 -0400
commitf9b15d951c1900806b0e37b528dd063bede7c550 (patch)
tree5d598f298a1d256002e4d888e1baf060baa7d7f7
parentc6473f4e7fe0ab0c8e855c2e64b222e62fb2c7d9 (diff)
downloadrockbox-f9b15d951c.tar.gz
rockbox-f9b15d951c.zip
[coverity] folder_select.c find_from_filename() guard against NULL
its pretty doubtful you wouldn't find a slash in a folder path Change-Id: Ibf2069f37c235716d4d90aec6d68410a93c2bdc6
-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 a76d77562b..e8a9712e33 100644
--- a/apps/gui/folder_select.c
+++ b/apps/gui/folder_select.c
@@ -482,7 +482,7 @@ static struct child* find_from_filename(const char* filename, struct folder *roo
cascade:
/* filename == XXX/YYY. cascade down */
child_set_state_expand(this, root);
- while (slash[0] == '/') slash++; /* eat slashes */
+ while (slash && slash[0] == '/') slash++; /* eat slashes */
return find_from_filename(slash, this->folder);
}