forked from len0rd/rockbox
playlist: Fix out-of-bounds array access when the directory is blank
Change-Id: Ibf59f8191f1f26cf97c5d3ffcb5e3e4c7304bca0
This commit is contained in:
parent
ce7731527a
commit
b6a16949e8
1 changed files with 1 additions and 1 deletions
|
|
@ -524,7 +524,7 @@ static void update_playlist_filename(struct playlist_info* playlist,
|
||||||
|
|
||||||
/* If the dir does not end in trailing slash, we use a separator.
|
/* If the dir does not end in trailing slash, we use a separator.
|
||||||
Otherwise we don't. */
|
Otherwise we don't. */
|
||||||
if('/' != dir[dirlen-1])
|
if(!dirlen || '/' != dir[dirlen-1])
|
||||||
{
|
{
|
||||||
sep="/";
|
sep="/";
|
||||||
dirlen++;
|
dirlen++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue