Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
c97d0f51
Commit
c97d0f51
authored
Mar 31, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an old overflow and two recent bugs introduced by me
parent
026d276d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/input/subtitles.c
src/input/subtitles.c
+5
-6
No files found.
src/input/subtitles.c
View file @
c97d0f51
...
...
@@ -272,10 +272,6 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
char
*
f_dir
=
NULL
,
*
f_fname
=
NULL
,
*
f_fname_noext
=
NULL
,
*
f_fname_trim
=
NULL
;
char
*
tmp
=
NULL
;
char
tmp_fname_noext
[
PATH_MAX
];
char
tmp_fname_trim
[
PATH_MAX
];
char
tmp_fname_ext
[
PATH_MAX
];
char
**
tmp_subdirs
,
**
subdirs
;
/* list of subdirectories to look in */
subfn
*
result
=
NULL
;
/* unsorted results */
...
...
@@ -371,6 +367,10 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
if
(
psz_name
==
NULL
)
continue
;
char
tmp_fname_noext
[
strlen
(
psz_name
)
+
1
];
char
tmp_fname_trim
[
strlen
(
psz_name
)
+
1
];
char
tmp_fname_ext
[
strlen
(
psz_name
)
+
1
];
/* retrieve various parts of the filename */
strcpy_strip_ext
(
tmp_fname_noext
,
psz_name
);
strcpy_get_ext
(
tmp_fname_ext
,
psz_name
);
...
...
@@ -420,14 +420,13 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
"autodetected subtitle: %s with priority %d"
,
psz_path
,
i_prio
);
result
[
i_sub_count
].
priority
=
i_prio
;
result
[
i_sub_count
].
psz_fname
=
psz_path
;
result
[
i_sub_count
].
psz_fname
=
strdup
(
psz_path
)
;
result
[
i_sub_count
].
psz_ext
=
strdup
(
tmp_fname_ext
);
i_sub_count
++
;
}
else
{
msg_Dbg
(
p_this
,
"fopen failed"
);
free
(
psz_path
);
}
}
if
(
i_sub_count
>=
MAX_SUBTITLE_FILES
)
break
;
...
...
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