summaryrefslogtreecommitdiffstats
path: root/apps/menus/playlist_menu.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-08-21 16:14:18 +0000
committerNils Wallménius <nils@rockbox.org>2010-08-21 16:14:18 +0000
commitf30add4dc08fe63b8417a4e63203649a3434d0f4 (patch)
tree5f4b21a74a903f7858808b6c6b5d0cd6600f6243 /apps/menus/playlist_menu.c
parent6cc0a93c3c5f2036d995a1a2eec3316828b8dfe3 (diff)
downloadrockbox-f30add4dc08fe63b8417a4e63203649a3434d0f4.tar.gz
rockbox-f30add4dc08fe63b8417a4e63203649a3434d0f4.zip
Safeguard against possible stack corruption when the string in the tempbuffer is as long as the buffer and strcat adds a char.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27854 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/playlist_menu.c')
-rw-r--r--apps/menus/playlist_menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c
index 2237761efd..a47c3b15e4 100644
--- a/apps/menus/playlist_menu.c
+++ b/apps/menus/playlist_menu.c
@@ -41,7 +41,7 @@ int save_playlist_screen(struct playlist_info* playlist)
char temp[MAX_PATH+1];
int len;
- playlist_get_name(playlist, temp, sizeof(temp));
+ playlist_get_name(playlist, temp, sizeof(temp)-1);
len = strlen(temp);
if (len > 4 && !strcasecmp(&temp[len-4], ".m3u"))