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
065691d7
Commit
065691d7
authored
Apr 29, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also use strlcpy()
parent
533d6dbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
src/input/subtitles.c
src/input/subtitles.c
+3
-9
No files found.
src/input/subtitles.c
View file @
065691d7
...
...
@@ -104,10 +104,7 @@ static void strcpy_strip_ext( char *d, char *s )
return
;
}
else
{
strncpy
(
d
,
s
,
tmp
-
s
);
d
[
tmp
-
s
]
=
0
;
}
strlcpy
(
d
,
s
,
tmp
-
s
);
while
(
*
d
)
{
*
d
=
tolower
(
*
d
);
...
...
@@ -298,11 +295,8 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
strcpy
(
f_fname
,
tmp
+
1
);
// we skip the seperator, so it will still fit in the allocated space
dirlen
=
strlen
(
psz_fname
)
-
strlen
(
tmp
)
+
1
;
// add the seperator
f_dir
=
malloc
(
dirlen
+
1
);
if
(
f_dir
)
{
strncpy
(
f_dir
,
psz_fname
,
dirlen
);
f_dir
[
dirlen
]
=
0
;
}
if
(
f_dir
!=
NULL
)
strlcpy
(
f_dir
,
psz_fname
,
dirlen
);
}
else
{
...
...
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