Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f0ec1547
Commit
f0ec1547
authored
Dec 12, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FYI, snprintf always nul-terminates
parent
79ca7b08
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/modules/modules.c
src/modules/modules.c
+4
-6
No files found.
src/modules/modules.c
View file @
f0ec1547
...
...
@@ -2008,11 +2008,10 @@ static void CacheSave( vlc_object_t *p_this )
}
char
psz_filename
[
sizeof
(
DIR_SEP
)
+
32
+
strlen
(
psz_cachedir
)];
i_len
=
sizeof
(
DIR_SEP
)
+
32
+
strlen
(
psz_cachedir
);
config_CreateDir
(
p_this
,
psz_cachedir
);
snprintf
(
psz_filename
,
i_len
,
"%s"
DIR_SEP
"CACHEDIR.TAG"
,
psz_cachedir
);
psz_filename
[
i_len
-
1
]
=
'\0'
;
snprintf
(
psz_filename
,
sizeof
(
psz_filename
),
"%s"
DIR_SEP
"CACHEDIR.TAG"
,
psz_cachedir
)
;
file
=
utf8_fopen
(
psz_filename
,
"wb"
);
if
(
file
)
{
...
...
@@ -2020,9 +2019,8 @@ static void CacheSave( vlc_object_t *p_this )
fclose
(
file
);
}
memset
(
psz_filename
,
0
,
i_len
);
snprintf
(
psz_filename
,
i_len
,
"%s"
DIR_SEP
"%s"
,
psz_cachedir
,
CacheName
()
);
psz_filename
[
i_len
-
1
]
=
'\0'
;
snprintf
(
psz_filename
,
sizeof
(
psz_filename
),
"%s"
DIR_SEP
"%s"
,
psz_cachedir
,
CacheName
()
);
msg_Dbg
(
p_this
,
"saving plugins cache file %s"
,
psz_filename
);
file
=
utf8_fopen
(
psz_filename
,
"wb"
);
...
...
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