Skip to content

Commit 7fa9ca9

Browse files
author
Tvisha Andharia
committed
Fix #1485, Adding a comment
1 parent 6033f44 commit 7fa9ca9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/os/shared/src/osapi-filesys.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,12 @@ int32 OS_TranslatePath(const char *VirtualPath, char *LocalPath)
703703
return OS_FS_ERR_PATH_INVALID;
704704
}
705705

706+
/*
707+
** Preventing backing out of the virtual mount point
708+
*/
706709
result = strstr(VirtualPath, "..");
707-
if (result) {
710+
if (result)
711+
{
708712
return OS_FS_ERR_PATH_INVALID;
709713
}
710714

0 commit comments

Comments
 (0)