summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-12-06 21:11:51 +0000
committerNils Wallménius <nils@rockbox.org>2009-12-06 21:11:51 +0000
commitee15637749e293139f31a32548850cb549d3533e (patch)
tree50e0e34d086dc44e252e83231b2155c7067f1443
parent51d89e25940a79401b71c3a4d2e23bba88c2647f (diff)
downloadrockbox-ee15637749e293139f31a32548850cb549d3533e.tar.gz
rockbox-ee15637749e293139f31a32548850cb549d3533e.zip
FS#10834 by Alex Bennee, fixing off-by-one bug in code calling format_track_path
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23879 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playlist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 0c4fe9785b..fba9b6f4bb 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1348,7 +1348,7 @@ static int get_filename(struct playlist_info* playlist, int index, int seek,
1348 if (playlist->filenames[index] != NULL) 1348 if (playlist->filenames[index] != NULL)
1349 { 1349 {
1350 dircache_copy_path(playlist->filenames[index], tmp_buf, sizeof(tmp_buf)-1); 1350 dircache_copy_path(playlist->filenames[index], tmp_buf, sizeof(tmp_buf)-1);
1351 max = strlen(tmp_buf) + 1; 1351 max = strlen(tmp_buf);
1352 } 1352 }
1353 } 1353 }
1354#else 1354#else
@@ -1357,8 +1357,7 @@ static int get_filename(struct playlist_info* playlist, int index, int seek,
1357 1357
1358 if (playlist->in_ram && !control_file && max < 0) 1358 if (playlist->in_ram && !control_file && max < 0)
1359 { 1359 {
1360 strlcpy(tmp_buf, &playlist->buffer[seek], sizeof(tmp_buf)); 1360 max = strlcpy(tmp_buf, &playlist->buffer[seek], sizeof(tmp_buf));
1361 max = strlen(tmp_buf) + 1;
1362 } 1361 }
1363 else if (max < 0) 1362 else if (max < 0)
1364 { 1363 {