diff options
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 888b53d282..ab5c59328a 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -1457,7 +1457,7 @@ static int get_filename(struct playlist_info* playlist, int index, int seek, | |||
1457 | } | 1457 | } |
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | strlcpy(dir_buf, playlist->filename, playlist->dirlen); | 1460 | strmemccpy(dir_buf, playlist->filename, playlist->dirlen); |
1461 | 1461 | ||
1462 | return format_track_path(buf, tmp_buf, buf_length, dir_buf); | 1462 | return format_track_path(buf, tmp_buf, buf_length, dir_buf); |
1463 | 1463 | ||
@@ -1551,7 +1551,7 @@ static int get_next_dir(char *dir, bool is_forward) | |||
1551 | 1551 | ||
1552 | /* if the current file is within our base dir, use its dir instead */ | 1552 | /* if the current file is within our base dir, use its dir instead */ |
1553 | if (base_len == 0 || !strncmp(playlist->filename, dir, base_len)) | 1553 | if (base_len == 0 || !strncmp(playlist->filename, dir, base_len)) |
1554 | strlcpy(dir, playlist->filename, playlist->dirlen); | 1554 | strmemccpy(dir, playlist->filename, playlist->dirlen); |
1555 | 1555 | ||
1556 | /* use the tree browser dircache to load files */ | 1556 | /* use the tree browser dircache to load files */ |
1557 | *(tc->dirfilter) = SHOW_ALL; | 1557 | *(tc->dirfilter) = SHOW_ALL; |
@@ -2034,7 +2034,7 @@ void playlist_init(void) | |||
2034 | mutex_init(&created_playlist_mutex); | 2034 | mutex_init(&created_playlist_mutex); |
2035 | 2035 | ||
2036 | playlist->current = true; | 2036 | playlist->current = true; |
2037 | strlcpy(playlist->control_filename, PLAYLIST_CONTROL_FILE, | 2037 | strmemccpy(playlist->control_filename, PLAYLIST_CONTROL_FILE, |
2038 | sizeof(playlist->control_filename)); | 2038 | sizeof(playlist->control_filename)); |
2039 | playlist->fd = -1; | 2039 | playlist->fd = -1; |
2040 | playlist->control_fd = -1; | 2040 | playlist->control_fd = -1; |
@@ -2955,7 +2955,7 @@ int playlist_set_current(struct playlist_info* playlist) | |||
2955 | 2955 | ||
2956 | empty_playlist(¤t_playlist, false); | 2956 | empty_playlist(¤t_playlist, false); |
2957 | 2957 | ||
2958 | strlcpy(current_playlist.filename, playlist->filename, | 2958 | strmemccpy(current_playlist.filename, playlist->filename, |
2959 | sizeof(current_playlist.filename)); | 2959 | sizeof(current_playlist.filename)); |
2960 | 2960 | ||
2961 | current_playlist.utf8 = playlist->utf8; | 2961 | current_playlist.utf8 = playlist->utf8; |
@@ -3517,7 +3517,7 @@ char *playlist_name(const struct playlist_info* playlist, char *buf, | |||
3517 | if (!playlist) | 3517 | if (!playlist) |
3518 | playlist = ¤t_playlist; | 3518 | playlist = ¤t_playlist; |
3519 | 3519 | ||
3520 | strlcpy(buf, playlist->filename+playlist->dirlen, buf_size); | 3520 | strmemccpy(buf, playlist->filename+playlist->dirlen, buf_size); |
3521 | 3521 | ||
3522 | if (!buf[0]) | 3522 | if (!buf[0]) |
3523 | return NULL; | 3523 | return NULL; |
@@ -3537,7 +3537,7 @@ char *playlist_get_name(const struct playlist_info* playlist, char *buf, | |||
3537 | if (!playlist) | 3537 | if (!playlist) |
3538 | playlist = ¤t_playlist; | 3538 | playlist = ¤t_playlist; |
3539 | 3539 | ||
3540 | strlcpy(buf, playlist->filename, buf_size); | 3540 | strmemccpy(buf, playlist->filename, buf_size); |
3541 | 3541 | ||
3542 | if (!buf[0]) | 3542 | if (!buf[0]) |
3543 | return NULL; | 3543 | return NULL; |