@@ -691,7 +691,7 @@ static void init_startup_info(STARTUPINFOW *si, descriptorspec_item *descriptors
691691
692692static void init_process_info (PROCESS_INFORMATION * pi )
693693{
694- memset (& pi , 0 , sizeof (pi ));
694+ memset (pi , 0 , sizeof (* pi ));
695695}
696696
697697/* on success, returns length of *comspec, which then needs to be efree'd by caller */
@@ -742,7 +742,7 @@ static size_t find_comspec_nt(wchar_t **comspec)
742742
743743static zend_result convert_command_to_use_shell (wchar_t * * cmdw , size_t cmdw_len )
744744{
745- wchar_t * comspec ;
745+ wchar_t * comspec = NULL ;
746746 size_t len = find_comspec_nt (& comspec );
747747 if (len == 0 ) {
748748 php_error_docref (NULL , E_WARNING , "Command conversion failed" );
@@ -827,7 +827,7 @@ static zend_result set_proc_descriptor_to_blackhole(descriptorspec_item *desc)
827827#ifdef PHP_WIN32
828828 desc -> childend = CreateFileA ("nul" , GENERIC_READ | GENERIC_WRITE ,
829829 FILE_SHARE_READ | FILE_SHARE_WRITE , NULL , OPEN_EXISTING , 0 , NULL );
830- if (desc -> childend == NULL ) {
830+ if (desc -> childend == INVALID_HANDLE_VALUE ) {
831831 php_error_docref (NULL , E_WARNING , "Failed to open nul" );
832832 return FAILURE ;
833833 }
0 commit comments