[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
This commit is contained in:
William Wilgus 2024-06-02 21:34:19 -04:00
parent 2903a8e8ac
commit f4a044e561

View file

@ -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;