pajoye                                   Thu, 15 Oct 2009 21:32:24 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=289687

Log:
- Merge: fix crash for bug #47627

Bug: http://bugs.php.net/47627 (Bogus) "No input file specified" causing crash
      
Changed paths:
    U   php/php-src/branches/PHP_5_3_1/main/main.c
    U   php/php-src/branches/PHP_5_3_1/win32/registry.c

Modified: php/php-src/branches/PHP_5_3_1/main/main.c
===================================================================
--- php/php-src/branches/PHP_5_3_1/main/main.c  2009-10-15 21:29:00 UTC (rev 
289686)
+++ php/php-src/branches/PHP_5_3_1/main/main.c  2009-10-15 21:32:24 UTC (rev 
289687)
@@ -2162,7 +2162,9 @@
                char realfile[MAXPATHLEN];

 #ifdef PHP_WIN32
-               UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
+               if(primary_file->filename) {
+                       UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
+               }
 #endif

                PG(during_request_startup) = 0;
@@ -2252,7 +2254,9 @@

        zend_try {
 #ifdef PHP_WIN32
-               UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
+               if(primary_file->filename) {
+                       UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
+               }
 #endif

                PG(during_request_startup) = 0;

Modified: php/php-src/branches/PHP_5_3_1/win32/registry.c
===================================================================
--- php/php-src/branches/PHP_5_3_1/win32/registry.c     2009-10-15 21:29:00 UTC 
(rev 289686)
+++ php/php-src/branches/PHP_5_3_1/win32/registry.c     2009-10-15 21:32:24 UTC 
(rev 289687)
@@ -168,6 +168,10 @@
        int path_len;
        HashTable **pht;

+       if(!path) {
+               return;
+       }
+
        if (!PW32G(registry_directories)) {
                PW32G(registry_directories) = 
(HashTable*)malloc(sizeof(HashTable));
                zend_hash_init(PW32G(registry_directories), 0, NULL, 
delete_internal_hashtable, 1);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to