forked from len0rd/rockbox
Prevent out-of-bounds array access when a tagnavi config file defines too many %format specifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30006 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4456abb601
commit
851cac848a
1 changed files with 6 additions and 0 deletions
|
|
@ -462,6 +462,12 @@ static int get_format_str(struct display_format *fmt)
|
|||
|
||||
static int add_format(const char *buf)
|
||||
{
|
||||
if (format_count >= TAGMENU_MAX_FMTS)
|
||||
{
|
||||
logf("too many formats");
|
||||
return -1;
|
||||
}
|
||||
|
||||
strp = buf;
|
||||
|
||||
if (formats[format_count] == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue