From 9f2f15ebf07747f3750b4fb906eef0e18e3fa989 Mon Sep 17 00:00:00 2001 From: nls Date: Sat, 21 Aug 2010 16:14:18 +0000 Subject: [PATCH] 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 2237761ef..a47c3b15e 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")) -- 2.11.4.GIT