From f4a044e56110d03cc581c3be89be3117f76c90b0 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 2 Jun 2024 21:34:19 -0400 Subject: [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 --- apps/playlist.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps') 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; -- cgit v1.2.3