Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
6d273994
Commit
6d273994
authored
Dec 12, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't recurse in symbolic link - fixes #375
parent
d708c14a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
modules/access/directory.c
modules/access/directory.c
+19
-2
No files found.
modules/access/directory.c
View file @
6d273994
...
...
@@ -368,6 +368,7 @@ static int Demux( demux_t *p_demux )
{
return
0
;
}
/*****************************************************************************
* DemuxControl:
*****************************************************************************/
...
...
@@ -380,11 +381,12 @@ static int Filter( const struct dirent *foo )
{
return
VLC_TRUE
;
}
/*****************************************************************************
* ReadDir: read a directory and add its content to the list
*****************************************************************************/
static
int
ReadDir
(
playlist_t
*
p_playlist
,
const
char
*
psz_name
,
int
i_mode
,
playlist_item_t
*
p_parent
)
static
int
ReadDir
(
playlist_t
*
p_playlist
,
const
char
*
psz_name
,
int
i_mode
,
playlist_item_t
*
p_parent
)
{
struct
dirent
**
pp_dir_content
;
int
i_dir_content
,
i
;
...
...
@@ -465,6 +467,21 @@ static int ReadDir( playlist_t *p_playlist,
if
(
(
p_dir_content
->
d_type
&
DT_DIR
)
&&
i_mode
!=
MODE_COLLAPSE
)
#endif
{
#if defined( S_ISLNK )
/*
* FIXME: there is a ToCToU race condition here; but it is rather tricky^W^W
* impossible to fix while keeping some kind of portable code, and maybe even
* in a non-portable way.
*/
if
(
lstat
(
psz_uri
,
&
stat_data
)
||
S_ISLNK
(
stat_data
.
st_mode
)
)
{
msg_Dbg
(
p_playlist
,
"Skipping directory symlink %s"
,
psz_uri
);
free
(
psz_uri
);
continue
;
}
#endif
if
(
i_mode
==
MODE_NONE
)
{
msg_Dbg
(
p_playlist
,
"Skipping subdirectory %s"
,
psz_uri
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment