summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-06-02 21:34:19 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-06-02 21:40:20 -0400
commitf4a044e56110d03cc581c3be89be3117f76c90b0 (patch)
tree66d94100b49c01cf37935ec15530716916f4d40b
parent2903a8e8ac089f2738171cb0281e98219f08b969 (diff)
downloadrockbox-f4a044e561.tar.gz
rockbox-f4a044e561.zip
[coverity] playlist.c get_track_filename() uninitialized buffer
format_track_path() uses path_append_ex() which might use strlen on the existing buffer likely a false positive but cheap enough to guard against Change-Id: I7061a434460f235fc58016f9dcf2dfe4633b9f59
-rw-r--r--apps/playlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 3600918eb3..9935643f5d 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1042,6 +1042,8 @@ static int get_track_filename(struct playlist_info* playlist, int index,
char tmp_buf[MAX_PATH+1];
char dir_buf[MAX_PATH+1];
bool utf8 = playlist->utf8;
+ if (buf_length > 0)
+ buf[0] = '\0';
if (index < 0 || index >= playlist->amount)
return -1;