1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Nils Wallménius 2010-08-21 16:14:18 +00:00
parent 6cc0a93c3c
commit f30add4dc0

View file

@ -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"))