mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
[COV] tree.c rockbox_browse potential NULL deref
ultimately its only used as a way to prevent reentry but coverity correctly identified the possibility.. Change-Id: I4738e52782ad4cac6134394238345a0491a50382
This commit is contained in:
parent
c2bc7aa516
commit
4ce8963c50
1 changed files with 8 additions and 2 deletions
10
apps/tree.c
10
apps/tree.c
|
@ -1064,8 +1064,14 @@ int rockbox_browse(struct browse_context *browse)
|
|||
{
|
||||
tc.is_browsing = (browse != NULL);
|
||||
int ret_val = 0;
|
||||
int dirfilter = tc.is_browsing ? browse->dirfilter : SHOW_ALL;
|
||||
|
||||
int dirfilter = SHOW_ALL;
|
||||
if (tc.is_browsing)
|
||||
dirfilter = browse->dirfilter;
|
||||
else
|
||||
{
|
||||
debugf("%s browse is [NULL] \n", __func__);
|
||||
browse = tc.browse;
|
||||
}
|
||||
if (backup_count >= NUM_TC_BACKUP)
|
||||
return GO_TO_PREVIOUS;
|
||||
if (backup_count >= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue