From f30add4dc08fe63b8417a4e63203649a3434d0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Sat, 21 Aug 2010 16:14:18 +0000 Subject: 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 --- apps/menus/playlist_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c index 2237761..a47c3b1 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")) -- cgit v1.1