/* 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 */
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 );
#ifndef LIBVLC_LIBVLC_H
# define LIBVLC_LIBVLC_H 1
+# include <stdbool.h>
+
extern const char vlc_usage[];
extern const struct hotkey libvlc_hotkeys[];
/*
* Variables stuff
*/
-void var_OptionParse (vlc_object_t *, const char *);
+void var_OptionParse (vlc_object_t *, const char *, bool trusted);
#endif
* 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;
( !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 )