Lines Matching refs:mydata
203 phar_archive_data *mydata = NULL; in phar_parse_zipfile() local
251 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_zipfile()
252 mydata->is_persistent = PHAR_G(persist); in phar_parse_zipfile()
264 pefree(mydata, mydata->is_persistent); in phar_parse_zipfile()
268 …phar_parse_metadata_lazy(metadata, &mydata->metadata_tracker, PHAR_GET_16(locator.comment_len), my… in phar_parse_zipfile()
270 ZVAL_UNDEF(&mydata->metadata_tracker.val); in phar_parse_zipfile()
284 mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); in phar_parse_zipfile()
286 phar_unixify_path_separators(mydata->fname, fname_len); in phar_parse_zipfile()
288 mydata->is_zip = 1; in phar_parse_zipfile()
289 mydata->fname_len = fname_len; in phar_parse_zipfile()
290 ext = strrchr(mydata->fname, '/'); in phar_parse_zipfile()
293 mydata->ext = memchr(ext, '.', (mydata->fname + fname_len) - ext); in phar_parse_zipfile()
294 if (mydata->ext == ext) { in phar_parse_zipfile()
295 mydata->ext = memchr(ext + 1, '.', (mydata->fname + fname_len) - ext - 1); in phar_parse_zipfile()
297 if (mydata->ext) { in phar_parse_zipfile()
298 mydata->ext_len = (mydata->fname + fname_len) - mydata->ext; in phar_parse_zipfile()
306 zend_hash_init(&mydata->manifest, PHAR_GET_16(locator.count), in phar_parse_zipfile()
307 zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); in phar_parse_zipfile()
308 zend_hash_init(&mydata->mounted_dirs, 5, in phar_parse_zipfile()
309 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_zipfile()
310 zend_hash_init(&mydata->virtual_dirs, PHAR_GET_16(locator.count) * 2, in phar_parse_zipfile()
311 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_zipfile()
312 entry.phar = mydata; in phar_parse_zipfile()
315 entry.is_persistent = mydata->is_persistent; in phar_parse_zipfile()
317 zend_hash_destroy(&mydata->manifest); \ in phar_parse_zipfile()
318 HT_INVALIDATE(&mydata->manifest); \ in phar_parse_zipfile()
319 zend_hash_destroy(&mydata->mounted_dirs); \ in phar_parse_zipfile()
320 HT_INVALIDATE(&mydata->mounted_dirs); \ in phar_parse_zipfile()
321 zend_hash_destroy(&mydata->virtual_dirs); \ in phar_parse_zipfile()
322 HT_INVALIDATE(&mydata->virtual_dirs); \ in phar_parse_zipfile()
324 phar_metadata_tracker_free(&mydata->metadata_tracker, mydata->is_persistent); \ in phar_parse_zipfile()
325 if (mydata->signature) { \ in phar_parse_zipfile()
326 efree(mydata->signature); \ in phar_parse_zipfile()
329 spprintf(error, 4096, "phar error: %s in zip-based phar \"%s\"", errmsg, mydata->fname); \ in phar_parse_zipfile()
331 pefree(mydata->fname, mydata->is_persistent); \ in phar_parse_zipfile()
332 if (mydata->alias) { \ in phar_parse_zipfile()
333 pefree(mydata->alias, mydata->is_persistent); \ in phar_parse_zipfile()
335 pefree(mydata, mydata->is_persistent); \ in phar_parse_zipfile()
339 zend_hash_destroy(&mydata->manifest); \ in phar_parse_zipfile()
340 HT_INVALIDATE(&mydata->manifest); \ in phar_parse_zipfile()
341 zend_hash_destroy(&mydata->mounted_dirs); \ in phar_parse_zipfile()
342 HT_INVALIDATE(&mydata->mounted_dirs); \ in phar_parse_zipfile()
343 zend_hash_destroy(&mydata->virtual_dirs); \ in phar_parse_zipfile()
344 HT_INVALIDATE(&mydata->virtual_dirs); \ in phar_parse_zipfile()
346 phar_metadata_tracker_free(&mydata->metadata_tracker, mydata->is_persistent); \ in phar_parse_zipfile()
347 if (mydata->signature) { \ in phar_parse_zipfile()
348 efree(mydata->signature); \ in phar_parse_zipfile()
351 spprintf(error, 4096, "phar error: %s in zip-based phar \"%s\"", errmsg, mydata->fname); \ in phar_parse_zipfile()
353 pefree(mydata->fname, mydata->is_persistent); \ in phar_parse_zipfile()
354 if (mydata->alias) { \ in phar_parse_zipfile()
355 pefree(mydata->alias, mydata->is_persistent); \ in phar_parse_zipfile()
357 pefree(mydata, mydata->is_persistent); \ in phar_parse_zipfile()
456 mydata->sig_flags = PHAR_GET_32(sig); in phar_parse_zipfile()
457 …ure(sigfile, php_stream_tell(sigfile), mydata->sig_flags, sig + 8, entry.uncompressed_filesize - 8… in phar_parse_zipfile()
470 mydata->sig_len = sig_len; in phar_parse_zipfile()
481 phar_add_virtual_dirs(mydata, entry.filename, entry.filename_len); in phar_parse_zipfile()
597 mydata->alias_len = entry.uncompressed_filesize; in phar_parse_zipfile()
687 …zend_hash_str_add_mem(&mydata->manifest, entry.filename, entry.filename_len, (void *)&entry, sizeo… in phar_parse_zipfile()
690 if (zend_hash_str_exists(&(mydata->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1)) { in phar_parse_zipfile()
691 mydata->is_data = 0; in phar_parse_zipfile()
693 mydata->is_data = 1; in phar_parse_zipfile()
697 if (!mydata->is_data && PHAR_G(require_hash) && !mydata->signature) { in phar_parse_zipfile()
701 mydata->fp = fp; in phar_parse_zipfile()
703 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_parse_zipfile()
708 if (!phar_validate_alias(actual_alias, mydata->alias_len)) { in phar_parse_zipfile()
713 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
717 mydata->is_temporary_alias = 0; in phar_parse_zipfile()
719 …if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alia… in phar_parse_zipfile()
720 if (SUCCESS != phar_free_alias(fd_ptr, actual_alias, mydata->alias_len)) { in phar_parse_zipfile()
725 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
730 …mydata->alias = entry.is_persistent ? pestrndup(actual_alias, mydata->alias_len, 1) : actual_alias; in phar_parse_zipfile()
736 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), mydata->alias, mydata->alias_len, mydata); in phar_parse_zipfile()
746 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
751 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alias_len, mydata); in phar_parse_zipfile()
752 mydata->alias = pestrndup(alias, alias_len, mydata->is_persistent); in phar_parse_zipfile()
753 mydata->alias_len = alias_len; in phar_parse_zipfile()
755 mydata->alias = pestrndup(mydata->fname, fname_len, mydata->is_persistent); in phar_parse_zipfile()
756 mydata->alias_len = fname_len; in phar_parse_zipfile()
759 mydata->is_temporary_alias = 1; in phar_parse_zipfile()
763 *pphar = mydata; in phar_parse_zipfile()