@@ -706,7 +706,7 @@ static void init_startup_info(STARTUPINFOW *si, descriptorspec_item *descriptors
706706
707707static void init_process_info (PROCESS_INFORMATION * pi )
708708{
709- memset (& pi , 0 , sizeof (pi ));
709+ memset (pi , 0 , sizeof (* pi ));
710710}
711711
712712/* on success, returns length of *comspec, which then needs to be efree'd by caller */
@@ -757,7 +757,7 @@ static size_t find_comspec_nt(wchar_t **comspec)
757757
758758static zend_result convert_command_to_use_shell (wchar_t * * cmdw , size_t cmdw_len )
759759{
760- wchar_t * comspec ;
760+ wchar_t * comspec = NULL ;
761761 size_t len = find_comspec_nt (& comspec );
762762 if (len == 0 ) {
763763 php_error_docref (NULL , E_WARNING , "Command conversion failed" );
@@ -842,7 +842,7 @@ static zend_result set_proc_descriptor_to_blackhole(descriptorspec_item *desc)
842842#ifdef PHP_WIN32
843843 desc -> childend = CreateFileA ("nul" , GENERIC_READ | GENERIC_WRITE ,
844844 FILE_SHARE_READ | FILE_SHARE_WRITE , NULL , OPEN_EXISTING , 0 , NULL );
845- if (desc -> childend == NULL ) {
845+ if (desc -> childend == INVALID_HANDLE_VALUE ) {
846846 php_error_docref (NULL , E_WARNING , "Failed to open nul" );
847847 return FAILURE ;
848848 }
0 commit comments