Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b426b192
Commit
b426b192
authored
May 08, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLC_VariableSet: assume unsafe variable settings. Fixes #1371.
parent
b9da1de8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
30 deletions
+8
-30
src/libvlc.c
src/libvlc.c
+8
-30
No files found.
src/libvlc.c
View file @
b426b192
...
@@ -1054,6 +1054,7 @@ int VLC_Destroy( int i_object )
...
@@ -1054,6 +1054,7 @@ int VLC_Destroy( int i_object )
int
VLC_VariableSet
(
int
i_object
,
char
const
*
psz_var
,
vlc_value_t
value
)
int
VLC_VariableSet
(
int
i_object
,
char
const
*
psz_var
,
vlc_value_t
value
)
{
{
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
module_config_t
*
p_item
;
int
i_ret
;
int
i_ret
;
if
(
!
p_vlc
)
if
(
!
p_vlc
)
...
@@ -1064,38 +1065,15 @@ int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value )
...
@@ -1064,38 +1065,15 @@ int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value )
/* FIXME: Temporary hack for Mozilla, if variable starts with conf:: then
/* FIXME: Temporary hack for Mozilla, if variable starts with conf:: then
* we handle it as a configuration variable. Don't tell Gildas :) -- sam */
* we handle it as a configuration variable. Don't tell Gildas :) -- sam */
if
(
!
strncmp
(
psz_var
,
"conf::"
,
6
)
)
if
(
!
strncmp
(
psz_var
,
"conf::"
,
6
)
)
{
psz_var
+=
6
;
module_config_t
*
p_item
;
char
const
*
psz_newvar
=
psz_var
+
6
;
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_vlc
),
psz_newvar
);
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_vlc
),
psz_newvar
);
if
(
!
p_item
)
return
VLC_ENOVAR
;
if
(
p_item
)
/* None of the variables are safe in this LibVLC version (we don't have
{
* the infrastructure in the 0.8.* branch. */
switch
(
p_item
->
i_type
)
return
VLC_EGENERIC
;
{
case
CONFIG_ITEM_BOOL
:
config_PutInt
(
p_vlc
,
psz_newvar
,
value
.
b_bool
);
break
;
case
CONFIG_ITEM_INTEGER
:
config_PutInt
(
p_vlc
,
psz_newvar
,
value
.
i_int
);
break
;
case
CONFIG_ITEM_FLOAT
:
config_PutFloat
(
p_vlc
,
psz_newvar
,
value
.
f_float
);
break
;
default:
config_PutPsz
(
p_vlc
,
psz_newvar
,
value
.
psz_string
);
break
;
}
if
(
i_object
)
vlc_object_release
(
p_vlc
);
return
VLC_SUCCESS
;
}
}
i_ret
=
var_Set
(
p_vlc
,
psz_var
,
value
);
if
(
i_object
)
vlc_object_release
(
p_vlc
);
return
i_ret
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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