mirror of
https://github.com/apache/nuttx.git
synced 2025-12-06 17:23:49 +08:00
fs/fat: Ignore //... sequences in the file path
This fixes an issue reported by user harishn6 on github. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
committed by
Matteo Golin
parent
fb4274187b
commit
1f15756156
@@ -362,6 +362,13 @@ static inline int fat_parsesfname(FAR const char **path,
|
||||
#ifdef CONFIG_FAT_LCNAMES
|
||||
dirinfo->fd_ntflags = ntlcfound & ntlcenable;
|
||||
#endif
|
||||
/* Ignore sequences of //... in the filename */
|
||||
|
||||
while (node && *node == '/')
|
||||
{
|
||||
node++;
|
||||
}
|
||||
|
||||
*terminator = ch;
|
||||
*path = node;
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user