]> granicus.if.org Git - php/commitdiff
Fixed issue #128 (opcache_invalidate segmentation fault)
authorDmitry Stogov <dmitry@zend.com>
Mon, 9 Sep 2013 06:05:59 +0000 (10:05 +0400)
committerDmitry Stogov <dmitry@zend.com>
Mon, 9 Sep 2013 06:05:59 +0000 (10:05 +0400)
ext/opcache/ZendAccelerator.c

index b5474c050761d5ceef242ee6540badbd243eda12..827f047cd4f65cc962abf671cf5d9c3c73790aa5 100644 (file)
@@ -1062,6 +1062,10 @@ int zend_accel_invalidate(const char *filename, int filename_len, zend_bool forc
        realpath = accelerator_orig_zend_resolve_path(filename, filename_len TSRMLS_CC);
 #endif
 
+       if (!realpath) {
+               return FAILURE;
+       }
+
        persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath, strlen(realpath) + 1);
        if (persistent_script && !persistent_script->corrupted) {
                zend_file_handle file_handle;