mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +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
|
#ifdef CONFIG_FAT_LCNAMES
|
||||||
dirinfo->fd_ntflags = ntlcfound & ntlcenable;
|
dirinfo->fd_ntflags = ntlcfound & ntlcenable;
|
||||||
#endif
|
#endif
|
||||||
|
/* Ignore sequences of //... in the filename */
|
||||||
|
|
||||||
|
while (node && *node == '/')
|
||||||
|
{
|
||||||
|
node++;
|
||||||
|
}
|
||||||
|
|
||||||
*terminator = ch;
|
*terminator = ch;
|
||||||
*path = node;
|
*path = node;
|
||||||
return OK;
|
return OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user