Lines Matching refs:mydata
202 phar_archive_data *mydata = NULL; in phar_parse_zipfile() local
250 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_zipfile()
251 mydata->is_persistent = PHAR_G(persist); in phar_parse_zipfile()
263 pefree(mydata, mydata->is_persistent); in phar_parse_zipfile()
267 …phar_parse_metadata_lazy(metadata, &mydata->metadata_tracker, PHAR_GET_16(locator.comment_len), my… in phar_parse_zipfile()
269 ZVAL_UNDEF(&mydata->metadata_tracker.val); in phar_parse_zipfile()
283 mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); in phar_parse_zipfile()
285 phar_unixify_path_separators(mydata->fname, fname_len); in phar_parse_zipfile()
287 mydata->is_zip = 1; in phar_parse_zipfile()
288 mydata->fname_len = fname_len; in phar_parse_zipfile()
289 ext = strrchr(mydata->fname, '/'); in phar_parse_zipfile()
292 mydata->ext = memchr(ext, '.', (mydata->fname + fname_len) - ext); in phar_parse_zipfile()
293 if (mydata->ext == ext) { in phar_parse_zipfile()
294 mydata->ext = memchr(ext + 1, '.', (mydata->fname + fname_len) - ext - 1); in phar_parse_zipfile()
296 if (mydata->ext) { in phar_parse_zipfile()
297 mydata->ext_len = (mydata->fname + fname_len) - mydata->ext; in phar_parse_zipfile()
305 zend_hash_init(&mydata->manifest, PHAR_GET_16(locator.count), in phar_parse_zipfile()
306 zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); in phar_parse_zipfile()
307 zend_hash_init(&mydata->mounted_dirs, 5, in phar_parse_zipfile()
308 zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); in phar_parse_zipfile()
309 zend_hash_init(&mydata->virtual_dirs, PHAR_GET_16(locator.count) * 2, in phar_parse_zipfile()
310 zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); in phar_parse_zipfile()
311 entry.phar = mydata; in phar_parse_zipfile()
314 entry.is_persistent = mydata->is_persistent; in phar_parse_zipfile()
316 zend_hash_destroy(&mydata->manifest); \ in phar_parse_zipfile()
317 HT_INVALIDATE(&mydata->manifest); \ in phar_parse_zipfile()
318 zend_hash_destroy(&mydata->mounted_dirs); \ in phar_parse_zipfile()
319 HT_INVALIDATE(&mydata->mounted_dirs); \ in phar_parse_zipfile()
320 zend_hash_destroy(&mydata->virtual_dirs); \ in phar_parse_zipfile()
321 HT_INVALIDATE(&mydata->virtual_dirs); \ in phar_parse_zipfile()
323 phar_metadata_tracker_free(&mydata->metadata_tracker, mydata->is_persistent); \ in phar_parse_zipfile()
324 if (mydata->signature) { \ in phar_parse_zipfile()
325 efree(mydata->signature); \ in phar_parse_zipfile()
328 spprintf(error, 4096, "phar error: %s in zip-based phar \"%s\"", errmsg, mydata->fname); \ in phar_parse_zipfile()
330 pefree(mydata->fname, mydata->is_persistent); \ in phar_parse_zipfile()
331 if (mydata->alias) { \ in phar_parse_zipfile()
332 pefree(mydata->alias, mydata->is_persistent); \ in phar_parse_zipfile()
334 pefree(mydata, mydata->is_persistent); \ in phar_parse_zipfile()
338 zend_hash_destroy(&mydata->manifest); \ in phar_parse_zipfile()
339 HT_INVALIDATE(&mydata->manifest); \ in phar_parse_zipfile()
340 zend_hash_destroy(&mydata->mounted_dirs); \ in phar_parse_zipfile()
341 HT_INVALIDATE(&mydata->mounted_dirs); \ in phar_parse_zipfile()
342 zend_hash_destroy(&mydata->virtual_dirs); \ in phar_parse_zipfile()
343 HT_INVALIDATE(&mydata->virtual_dirs); \ in phar_parse_zipfile()
345 phar_metadata_tracker_free(&mydata->metadata_tracker, mydata->is_persistent); \ in phar_parse_zipfile()
346 if (mydata->signature) { \ in phar_parse_zipfile()
347 efree(mydata->signature); \ in phar_parse_zipfile()
350 spprintf(error, 4096, "phar error: %s in zip-based phar \"%s\"", errmsg, mydata->fname); \ in phar_parse_zipfile()
352 pefree(mydata->fname, mydata->is_persistent); \ in phar_parse_zipfile()
353 if (mydata->alias) { \ in phar_parse_zipfile()
354 pefree(mydata->alias, mydata->is_persistent); \ in phar_parse_zipfile()
356 pefree(mydata, mydata->is_persistent); \ in phar_parse_zipfile()
455 mydata->sig_flags = PHAR_GET_32(sig); in phar_parse_zipfile()
456 …ure(sigfile, php_stream_tell(sigfile), mydata->sig_flags, sig + 8, entry.uncompressed_filesize - 8… in phar_parse_zipfile()
469 mydata->sig_len = sig_len; in phar_parse_zipfile()
480 phar_add_virtual_dirs(mydata, entry.filename, entry.filename_len); in phar_parse_zipfile()
596 mydata->alias_len = entry.uncompressed_filesize; in phar_parse_zipfile()
686 …zend_hash_str_add_mem(&mydata->manifest, entry.filename, entry.filename_len, (void *)&entry, sizeo… in phar_parse_zipfile()
689 if (zend_hash_str_exists(&(mydata->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1)) { in phar_parse_zipfile()
690 mydata->is_data = 0; in phar_parse_zipfile()
692 mydata->is_data = 1; in phar_parse_zipfile()
696 if (!mydata->is_data && PHAR_G(require_hash) && !mydata->signature) { in phar_parse_zipfile()
700 mydata->fp = fp; in phar_parse_zipfile()
702 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_parse_zipfile()
707 if (!phar_validate_alias(actual_alias, mydata->alias_len)) { in phar_parse_zipfile()
712 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
716 mydata->is_temporary_alias = 0; in phar_parse_zipfile()
718 …if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alia… in phar_parse_zipfile()
719 if (SUCCESS != phar_free_alias(fd_ptr, actual_alias, mydata->alias_len)) { in phar_parse_zipfile()
724 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
729 …mydata->alias = entry.is_persistent ? pestrndup(actual_alias, mydata->alias_len, 1) : actual_alias; in phar_parse_zipfile()
735 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), mydata->alias, mydata->alias_len, mydata); in phar_parse_zipfile()
745 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_parse_zipfile()
750 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alias_len, mydata); in phar_parse_zipfile()
751 mydata->alias = pestrndup(alias, alias_len, mydata->is_persistent); in phar_parse_zipfile()
752 mydata->alias_len = alias_len; in phar_parse_zipfile()
754 mydata->alias = pestrndup(mydata->fname, fname_len, mydata->is_persistent); in phar_parse_zipfile()
755 mydata->alias_len = fname_len; in phar_parse_zipfile()
758 mydata->is_temporary_alias = 1; in phar_parse_zipfile()
762 *pphar = mydata; in phar_parse_zipfile()