forked from len0rd/rockbox
database: Validate paths against MAX_PATH as well as TAX_MAXLEN
TAG_MAXLEN is 2* MAX_PATH, so this means we don't reject paths that we could never actually open on the device. Change-Id: I64363758163c0a6a5f54ebb1c9b455f3cb5b6e56
This commit is contained in:
parent
31939086af
commit
9e3bb65228
1 changed files with 1 additions and 1 deletions
|
@ -2255,7 +2255,7 @@ static void NO_INLINE add_tagcache(char *path, unsigned long mtime)
|
|||
return ;
|
||||
|
||||
/* Check for overlength file path. */
|
||||
if (path_length > TAG_MAXLEN)
|
||||
if (path_length > MAX_PATH || path_length > TAG_MAXLEN)
|
||||
{
|
||||
/* Path can't be shortened. */
|
||||
logf("Too long path: %s", path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue