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
827bc36d
Commit
827bc36d
authored
Aug 12, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check asprintf results.
parent
d2ae907e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/input/subtitles.c
src/input/subtitles.c
+6
-3
No files found.
src/input/subtitles.c
View file @
827bc36d
...
...
@@ -222,10 +222,12 @@ static char **paths_to_list( const char *psz_dir, char *psz_path )
if
(
*
psz_subdir
==
'\0'
)
continue
;
asprintf
(
&
subdirs
[
i
++
],
"%s%s%c"
,
if
(
asprintf
(
&
subdirs
[
i
++
],
"%s%s%c"
,
psz_subdir
[
0
]
==
'.'
?
psz_dir
:
""
,
psz_subdir
,
psz_subdir
[
strlen
(
psz_subdir
)
-
1
]
==
DIR_SEP_CHAR
?
'\0'
:
DIR_SEP_CHAR
);
psz_subdir
[
strlen
(
psz_subdir
)
-
1
]
==
DIR_SEP_CHAR
?
'\0'
:
DIR_SEP_CHAR
)
==
-
1
)
break
;
}
subdirs
[
i
]
=
NULL
;
...
...
@@ -288,7 +290,8 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
return
NULL
;
f_fname
=
strdup
(
psz_fname
);
asprintf
(
&
f_dir
,
"%s%c"
,
psz_cwd
,
DIR_SEP_CHAR
);
if
(
asprintf
(
&
f_dir
,
"%s%c"
,
psz_cwd
,
DIR_SEP_CHAR
)
==
-
1
)
f_dir
=
NULL
;
/* Assure that function will return in next test */
free
(
psz_cwd
);
}
if
(
!
f_fname
||
!
f_dir
)
...
...
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