@@ -546,10 +546,10 @@ static zend_string *create_win_command_from_args(HashTable *args)
546
546
547
547
/* Get a boolean option from the `other_options` array which can be passed to `proc_open`.
548
548
* (Currently, all options apply on Windows only.) */
549
- static bool get_option (zval * other_options , char * opt_name )
549
+ static bool get_option (zval * other_options , char * opt_name , size_t opt_name_len )
550
550
{
551
551
HashTable * opt_ary = Z_ARRVAL_P (other_options );
552
- zval * item = zend_hash_str_find_deref (opt_ary , opt_name , strlen ( opt_name ) );
552
+ zval * item = zend_hash_str_find_deref (opt_ary , opt_name , opt_name_len );
553
553
return item != NULL &&
554
554
(Z_TYPE_P (item ) == IS_TRUE ||
555
555
((Z_TYPE_P (item ) == IS_LONG ) && Z_LVAL_P (item )));
@@ -1072,12 +1072,12 @@ PHP_FUNCTION(proc_open)
1072
1072
1073
1073
#ifdef PHP_WIN32
1074
1074
if (other_options ) {
1075
- suppress_errors = get_option (other_options , "suppress_errors" );
1075
+ suppress_errors = get_option (other_options , "suppress_errors" , strlen ( "suppress_errors" ) );
1076
1076
/* TODO: Deprecate in favor of array command? */
1077
- bypass_shell = bypass_shell || get_option (other_options , "bypass_shell" );
1078
- blocking_pipes = get_option (other_options , "blocking_pipes" );
1079
- create_process_group = get_option (other_options , "create_process_group" );
1080
- create_new_console = get_option (other_options , "create_new_console" );
1077
+ bypass_shell = bypass_shell || get_option (other_options , "bypass_shell" , strlen ( "bypass_shell" ) );
1078
+ blocking_pipes = get_option (other_options , "blocking_pipes" , strlen ( "blocking_pipes" ) );
1079
+ create_process_group = get_option (other_options , "create_process_group" , strlen ( "create_process_group" ) );
1080
+ create_new_console = get_option (other_options , "create_new_console" , strlen ( "create_new_console" ) );
1081
1081
}
1082
1082
#endif
1083
1083
0 commit comments