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
709f415c
Commit
709f415c
authored
Mar 17, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide the trust value to var_OptionParse
parent
208d017e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
src/input/input.c
src/input/input.c
+1
-1
src/interface/interface.c
src/interface/interface.c
+1
-1
src/libvlc.h
src/libvlc.h
+3
-1
src/misc/variables.c
src/misc/variables.c
+4
-1
No files found.
src/input/input.c
View file @
709f415c
...
...
@@ -203,7 +203,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
/* Parse input options */
vlc_mutex_lock
(
&
p_item
->
lock
);
for
(
i
=
0
;
i
<
p_item
->
i_options
;
i
++
)
var_OptionParse
(
VLC_OBJECT
(
p_input
),
p_item
->
ppsz_options
[
i
]
);
var_OptionParse
(
VLC_OBJECT
(
p_input
),
p_item
->
ppsz_options
[
i
]
,
true
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
/* Create Object Variables for private use only */
...
...
src/interface/interface.c
View file @
709f415c
...
...
@@ -91,7 +91,7 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
p_intf
->
b_should_run_on_first_thread
=
VLC_FALSE
;
for
(
i
=
0
;
i
<
i_options
;
i
++
)
var_OptionParse
(
p_this
,
ppsz_options
[
i
]
);
var_OptionParse
(
p_this
,
ppsz_options
[
i
]
,
true
);
/* Choose the best module */
p_intf
->
psz_intf
=
strdup
(
psz_module
);
...
...
src/libvlc.h
View file @
709f415c
...
...
@@ -25,6 +25,8 @@
#ifndef LIBVLC_LIBVLC_H
# define LIBVLC_LIBVLC_H 1
# include <stdbool.h>
extern
const
char
vlc_usage
[];
extern
const
struct
hotkey
libvlc_hotkeys
[];
...
...
@@ -154,6 +156,6 @@ extern const size_t libvlc_config_count;
/*
* Variables stuff
*/
void
var_OptionParse
(
vlc_object_t
*
,
const
char
*
);
void
var_OptionParse
(
vlc_object_t
*
,
const
char
*
,
bool
trusted
);
#endif
src/misc/variables.c
View file @
709f415c
...
...
@@ -1036,9 +1036,11 @@ int __var_TriggerCallback( vlc_object_t *p_this, const char *psz_name )
* option name and bar is the value of the option.
* \param p_obj the object in which the variable must be created
* \param psz_option the option to parse
* \param trusted whether the option is set by a trusted input or not
* \return nothing
*/
void
var_OptionParse
(
vlc_object_t
*
p_obj
,
const
char
*
psz_option
)
void
var_OptionParse
(
vlc_object_t
*
p_obj
,
const
char
*
psz_option
,
bool
trusted
)
{
char
*
psz_name
,
*
psz_value
;
int
i_type
;
...
...
@@ -1091,6 +1093,7 @@ void var_OptionParse( vlc_object_t *p_obj, const char *psz_option )
(
!
psz_value
||
!*
psz_value
)
)
goto
cleanup
;
/* Invalid value */
/* check if option is unsafe */
if
(
!
trusted
)
{
module_config_t
*
p_config
=
config_FindConfig
(
p_obj
,
psz_name
);
if
(
!
p_config
->
b_safe
)
...
...
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