Lines Matching refs:mydata

235 	phar_archive_data *mydata = NULL;  in phar_parse_zipfile()  local
283 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_zipfile()
284 mydata->is_persistent = PHAR_G(persist); in phar_parse_zipfile()
296 pefree(mydata, mydata->is_persistent); in phar_parse_zipfile()
300 …phar_parse_metadata_lazy(metadata, &mydata->metadata_tracker, PHAR_GET_16(locator.comment_len), my… in phar_parse_zipfile()
302 ZVAL_UNDEF(&mydata->metadata_tracker.val); in phar_parse_zipfile()
316 mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); in phar_parse_zipfile()
318 phar_unixify_path_separators(mydata->fname, fname_len); in phar_parse_zipfile()
320 mydata->is_zip = 1; in phar_parse_zipfile()
321 mydata->fname_len = fname_len; in phar_parse_zipfile()
322 ext = strrchr(mydata->fname, '/'); in phar_parse_zipfile()
325 mydata->ext = memchr(ext, '.', (mydata->fname + fname_len) - ext); in phar_parse_zipfile()
326 if (mydata->ext == ext) { in phar_parse_zipfile()
327 mydata->ext = memchr(ext + 1, '.', (mydata->fname + fname_len) - ext - 1); in phar_parse_zipfile()
329 if (mydata->ext) { in phar_parse_zipfile()
330 mydata->ext_len = (mydata->fname + fname_len) - mydata->ext; in phar_parse_zipfile()
338 zend_hash_init(&mydata->manifest, PHAR_GET_16(locator.count), in phar_parse_zipfile()
339 zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); in phar_parse_zipfile()
340 zend_hash_init(&mydata->mounted_dirs, 5, in phar_parse_zipfile()
341 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_zipfile()
342 zend_hash_init(&mydata->virtual_dirs, PHAR_GET_16(locator.count) * 2, in phar_parse_zipfile()
343 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_zipfile()
344 entry.phar = mydata; in phar_parse_zipfile()
347 entry.is_persistent = mydata->is_persistent; in phar_parse_zipfile()
349 zend_hash_destroy(&mydata->manifest); \ in phar_parse_zipfile()
350 HT_INVALIDATE(&mydata->manifest); \ in phar_parse_zipfile()
351 zend_hash_destroy(&mydata->mounted_dirs); \ in phar_parse_zipfile()
352 HT_INVALIDATE(&mydata->mounted_dirs); \ in phar_parse_zipfile()
353 zend_hash_destroy(&mydata->virtual_dirs); \ in phar_parse_zipfile()
354 HT_INVALIDATE(&mydata->virtual_dirs); \ in phar_parse_zipfile()
356 phar_metadata_tracker_free(&mydata->metadata_tracker, mydata->is_persistent); \ in phar_parse_zipfile()
357 if (mydata->signature) { \ in phar_parse_zipfile()
358 efree(mydata->signature); \ in phar_parse_zipfile()
361 spprintf(error, 4096, "phar error: %s in zip-based phar \"%s\"", errmsg, mydata->fname); \ in phar_parse_zipfile()
363 pefree(mydata->fname, mydata->is_persistent); \ in phar_parse_zipfile()
364 if (mydata->alias) { \ in phar_parse_zipfile()
365 pefree(mydata->alias, mydata->is_persistent); \ in phar_parse_zipfile()
367 pefree(mydata, mydata->is_persistent); \ in phar_parse_zipfile()
371 zend_hash_destroy(&mydata->manifest); \ in phar_parse_zipfile()
372 HT_INVALIDATE(&mydata->manifest); \ in phar_parse_zipfile()
373 zend_hash_destroy(&mydata->mounted_dirs); \ in phar_parse_zipfile()
374 HT_INVALIDATE(&mydata->mounted_dirs); \ in phar_parse_zipfile()
375 zend_hash_destroy(&mydata->virtual_dirs); \ in phar_parse_zipfile()
376 HT_INVALIDATE(&mydata->virtual_dirs); \ in phar_parse_zipfile()
378 phar_metadata_tracker_free(&mydata->metadata_tracker, mydata->is_persistent); \ in phar_parse_zipfile()
379 if (mydata->signature) { \ in phar_parse_zipfile()
380 efree(mydata->signature); \ in phar_parse_zipfile()
383 spprintf(error, 4096, "phar error: %s in zip-based phar \"%s\"", errmsg, mydata->fname); \ in phar_parse_zipfile()
385 pefree(mydata->fname, mydata->is_persistent); \ in phar_parse_zipfile()
386 if (mydata->alias) { \ in phar_parse_zipfile()
387 pefree(mydata->alias, mydata->is_persistent); \ in phar_parse_zipfile()
389 pefree(mydata, mydata->is_persistent); \ in phar_parse_zipfile()
521 mydata->sig_flags = PHAR_GET_32(sig); in phar_parse_zipfile()
522 …ure(sigfile, php_stream_tell(sigfile), mydata->sig_flags, sig + 8, entry.uncompressed_filesize - 8… in phar_parse_zipfile()
535 mydata->sig_len = sig_len; in phar_parse_zipfile()
546 phar_add_virtual_dirs(mydata, entry.filename, entry.filename_len); in phar_parse_zipfile()
651 mydata->alias_len = entry.uncompressed_filesize; in phar_parse_zipfile()
741 …zend_hash_str_add_mem(&mydata->manifest, entry.filename, entry.filename_len, (void *)&entry, sizeo… in phar_parse_zipfile()
744 if (zend_hash_str_exists(&(mydata->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1)) { in phar_parse_zipfile()
745 mydata->is_data = 0; in phar_parse_zipfile()
747 mydata->is_data = 1; in phar_parse_zipfile()
751 if (!mydata->is_data && PHAR_G(require_hash) && !mydata->signature) { in phar_parse_zipfile()
755 mydata->fp = fp; in phar_parse_zipfile()
757 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_parse_zipfile()
762 if (!phar_validate_alias(actual_alias, mydata->alias_len)) { in phar_parse_zipfile()
767 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
771 mydata->is_temporary_alias = 0; in phar_parse_zipfile()
773 …if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alia… in phar_parse_zipfile()
774 if (SUCCESS != phar_free_alias(fd_ptr, actual_alias, mydata->alias_len)) { in phar_parse_zipfile()
779 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
784mydata->alias = entry.is_persistent ? pestrndup(actual_alias, mydata->alias_len, 1) : actual_alias; in phar_parse_zipfile()
790 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), mydata->alias, mydata->alias_len, mydata); in phar_parse_zipfile()
800 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
805 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata); in phar_parse_zipfile()
806 mydata->alias = pestrndup(alias, alias_len, mydata->is_persistent); in phar_parse_zipfile()
807 mydata->alias_len = alias_len; in phar_parse_zipfile()
809 mydata->alias = pestrndup(mydata->fname, fname_len, mydata->is_persistent); in phar_parse_zipfile()
810 mydata->alias_len = fname_len; in phar_parse_zipfile()
813 mydata->is_temporary_alias = 1; in phar_parse_zipfile()
817 *pphar = mydata; in phar_parse_zipfile()