diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-06-05 23:38:25 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-06-05 23:38:25 -0400 |
commit | f9b15d951c1900806b0e37b528dd063bede7c550 (patch) | |
tree | 5d598f298a1d256002e4d888e1baf060baa7d7f7 /apps/gui/folder_select.c | |
parent | c6473f4e7fe0ab0c8e855c2e64b222e62fb2c7d9 (diff) | |
download | rockbox-f9b15d951c1900806b0e37b528dd063bede7c550.tar.gz rockbox-f9b15d951c1900806b0e37b528dd063bede7c550.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
Diffstat (limited to 'apps/gui/folder_select.c')
-rw-r--r-- | apps/gui/folder_select.c | 2 |
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 | |||
482 | cascade: | 482 | cascade: |
483 | /* filename == XXX/YYY. cascade down */ | 483 | /* filename == XXX/YYY. cascade down */ |
484 | child_set_state_expand(this, root); | 484 | child_set_state_expand(this, root); |
485 | while (slash[0] == '/') slash++; /* eat slashes */ | 485 | while (slash && slash[0] == '/') slash++; /* eat slashes */ |
486 | return find_from_filename(slash, this->folder); | 486 | return find_from_filename(slash, this->folder); |
487 | } | 487 | } |
488 | 488 | ||