summaryrefslogtreecommitdiffstats
path: root/apps/playlist_catalog.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-04-09 15:25:17 +0000
committerNils Wallménius <nils@rockbox.org>2008-04-09 15:25:17 +0000
commit6848961aa5f93a290917071ff3496e1d5026621b (patch)
tree70d377348ab0694c356fffd9fe25f095ccbe88fe /apps/playlist_catalog.c
parentae64d2602befd5589c8c0141a6d812841fdfb232 (diff)
downloadrockbox-6848961aa5f93a290917071ff3496e1d5026621b.tar.gz
rockbox-6848961aa5f93a290917071ff3496e1d5026621b.tar.bz2
rockbox-6848961aa5f93a290917071ff3496e1d5026621b.zip
Pass the buffer length to the list_get_name callback functions instead of using hardcoded MAX_PATH
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r--apps/playlist_catalog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index af65353b67..3eb884483c 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -188,11 +188,11 @@ exit:
/* Callback for gui_synclist */
static char* playlist_callback_name(int selected_item, void* data,
- char* buffer)
+ char* buffer, size_t buffer_len)
{
char** playlists = (char**) data;
- strncpy(buffer, playlists[selected_item], MAX_PATH);
+ strncpy(buffer, playlists[selected_item], buffer_len);
if (buffer[0] != '.' && !(global_settings.show_filename_ext == 1
|| (global_settings.show_filename_ext == 3