diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-12-13 19:20:38 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-12-13 19:20:38 -0500 |
commit | b6a16949e88dbff5d13fdbaa2cd72ef25e10696a (patch) | |
tree | 754b348a395f3d71f5c3796eaa680280615bc92b /apps | |
parent | ce7731527ab71d789a8113ac6d136315b67cd013 (diff) |
playlist: Fix out-of-bounds array access when the directory is blank
Change-Id: Ibf59f8191f1f26cf97c5d3ffcb5e3e4c7304bca0
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 34a3ea53d2..2b94a13bca 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -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. Otherwise we don't. */ - if('/' != dir[dirlen-1]) + if(!dirlen || '/' != dir[dirlen-1]) { sep="/"; dirlen++; |