From f9b15d951c1900806b0e37b528dd063bede7c550 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 5 Jun 2024 23:38:25 -0400 Subject: [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 --- apps/gui/folder_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') 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); } -- cgit v1.2.3