Lines Matching refs:entry

42 static int phar_zip_process_extra(php_stream *fp, phar_entry_info *entry, php_uint16 len TSRMLS_DC)…  in phar_zip_process_extra()  argument
76 entry->flags &= PHAR_ENT_COMPRESSION_MASK; in phar_zip_process_extra()
78 if (entry->is_dir) { in phar_zip_process_extra()
79 entry->flags |= PHAR_GET_16(h.unix3.perms) & PHAR_ENT_PERM_MASK; in phar_zip_process_extra()
81 entry->flags |= PHAR_GET_16(h.unix3.perms) & PHAR_ENT_PERM_MASK; in phar_zip_process_extra()
173 phar_entry_info entry = {0}; in phar_parse_zipfile() local
244 if (entry.is_persistent) { in phar_parse_zipfile()
298 entry.phar = mydata; in phar_parse_zipfile()
299 entry.is_zip = 1; in phar_parse_zipfile()
300 entry.fp_type = PHAR_FP; in phar_parse_zipfile()
301 entry.is_persistent = mydata->is_persistent; in phar_parse_zipfile()
365 if (entry.is_persistent) { in phar_parse_zipfile()
366 entry.manifest_pos = i; in phar_parse_zipfile()
369 entry.compressed_filesize = PHAR_GET_32(zipentry.compsize); in phar_parse_zipfile()
370 entry.uncompressed_filesize = PHAR_GET_32(zipentry.uncompsize); in phar_parse_zipfile()
371 entry.crc32 = PHAR_GET_32(zipentry.crc32); in phar_parse_zipfile()
373 entry.timestamp = phar_zip_d2u_time(zipentry.timestamp, zipentry.datestamp); in phar_parse_zipfile()
374 entry.flags = PHAR_ENT_PERM_DEF_FILE; in phar_parse_zipfile()
375 entry.header_offset = PHAR_GET_32(zipentry.offset); in phar_parse_zipfile()
376entry.offset = entry.offset_abs = PHAR_GET_32(zipentry.offset) + sizeof(phar_zip_file_header) + PH… in phar_parse_zipfile()
387 entry.filename_len = PHAR_GET_16(zipentry.filename_len); in phar_parse_zipfile()
388 entry.filename = (char *) pemalloc(entry.filename_len + 1, entry.is_persistent); in phar_parse_zipfile()
390 if (entry.filename_len != php_stream_read(fp, entry.filename, entry.filename_len)) { in phar_parse_zipfile()
391 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
395 entry.filename[entry.filename_len] = '\0'; in phar_parse_zipfile()
397 if (entry.filename[entry.filename_len - 1] == '/') { in phar_parse_zipfile()
398 entry.is_dir = 1; in phar_parse_zipfile()
399 entry.filename_len--; in phar_parse_zipfile()
400 entry.flags |= PHAR_ENT_PERM_DEF_DIR; in phar_parse_zipfile()
402 entry.is_dir = 0; in phar_parse_zipfile()
405 …if (entry.filename_len == sizeof(".phar/signature.bin")-1 && !strncmp(entry.filename, ".phar/signa… in phar_parse_zipfile()
412 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
420 phar_stream_copy_to_stream(fp, sigfile, entry.header_offset, NULL); in phar_parse_zipfile()
428 …php_stream_seek(fp, sizeof(phar_zip_file_header) + entry.header_offset + entry.filename_len + PHAR… in phar_parse_zipfile()
429 sig = (char *) emalloc(entry.uncompressed_filesize); in phar_parse_zipfile()
430 read = php_stream_read(fp, sig, entry.uncompressed_filesize); in phar_parse_zipfile()
431 if (read != entry.uncompressed_filesize) { in phar_parse_zipfile()
437 …_signature(sigfile, php_stream_tell(sigfile), mydata->sig_flags, sig + 8, entry.uncompressed_files… in phar_parse_zipfile()
460 phar_add_virtual_dirs(mydata, entry.filename, entry.filename_len TSRMLS_CC); in phar_parse_zipfile()
464 if (FAILURE == phar_zip_process_extra(fp, &entry, PHAR_GET_16(zipentry.extra_len) TSRMLS_CC)) { in phar_parse_zipfile()
465 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
476 entry.flags |= PHAR_ENT_COMPRESSED_GZ; in phar_parse_zipfile()
478 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
483 entry.flags |= PHAR_ENT_COMPRESSED_BZ2; in phar_parse_zipfile()
485 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
490 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
496 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
499 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
502 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
505 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
508 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
511 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
514 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
517 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
520 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
523 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
526 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
533 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
538 entry.metadata_len = PHAR_GET_16(zipentry.comment_len); in phar_parse_zipfile()
540 …if (phar_parse_metadata(&p, &(entry.metadata), PHAR_GET_16(zipentry.comment_len) TSRMLS_CC) == FAI… in phar_parse_zipfile()
541 entry.metadata_len = 0; in phar_parse_zipfile()
544 if (entry.is_persistent) { in phar_parse_zipfile()
545 ALLOC_PERMANENT_ZVAL(entry.metadata); in phar_parse_zipfile()
547 ALLOC_ZVAL(entry.metadata); in phar_parse_zipfile()
550 INIT_ZVAL(*entry.metadata); in phar_parse_zipfile()
551 …ZVAL_STRINGL(entry.metadata, pestrndup(buf, PHAR_GET_16(zipentry.comment_len), entry.is_persistent… in phar_parse_zipfile()
554 entry.metadata = NULL; in phar_parse_zipfile()
557 …if (!actual_alias && entry.filename_len == sizeof(".phar/alias.txt")-1 && !strncmp(entry.filename,… in phar_parse_zipfile()
568 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
573entry.filename_len != PHAR_GET_16(local.filename_len) || entry.crc32 != PHAR_GET_32(local.crc32) |… in phar_parse_zipfile()
574 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
579 entry.offset = entry.offset_abs = in phar_parse_zipfile()
580 …sizeof(local) + entry.header_offset + PHAR_GET_16(local.filename_len) + PHAR_GET_16(local.extra_le… in phar_parse_zipfile()
585 php_stream_seek(fp, entry.offset, SEEK_SET); in phar_parse_zipfile()
589 php_stream_seek(fp, entry.offset, SEEK_SET); in phar_parse_zipfile()
594 mydata->alias_len = entry.uncompressed_filesize; in phar_parse_zipfile()
596 if (entry.flags & PHAR_ENT_COMPRESSED_GZ) { in phar_parse_zipfile()
600 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
606 …if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_f… in phar_parse_zipfile()
607 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
617 } else if (entry.flags & PHAR_ENT_COMPRESSED_BZ2) { in phar_parse_zipfile()
621 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
627 …if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_f… in phar_parse_zipfile()
628 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
638 …if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_f… in phar_parse_zipfile()
639 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
648 phar_set_inode(&entry TSRMLS_CC); in phar_parse_zipfile()
649 …zend_hash_add(&mydata->manifest, entry.filename, entry.filename_len, (void *)&entry,sizeof(phar_en… in phar_parse_zipfile()
687 …mydata->alias = entry.is_persistent ? pestrndup(actual_alias, mydata->alias_len, 1) : actual_alias; in phar_parse_zipfile()
689 if (entry.is_persistent) { in phar_parse_zipfile()
776 phar_entry_info *entry; in phar_zip_changed_apply() local
784 entry = (phar_entry_info *)data; in phar_zip_changed_apply()
787 if (entry->is_mounted) { in phar_zip_changed_apply()
791 if (entry->is_deleted) { in phar_zip_changed_apply()
792 if (entry->fp_refcount <= 0) { in phar_zip_changed_apply()
800 phar_add_virtual_dirs(entry->phar, entry->filename, entry->filename_len TSRMLS_CC); in phar_zip_changed_apply()
811 PHAR_SET_16(perms.perms, entry->flags & PHAR_ENT_PERM_MASK); in phar_zip_changed_apply()
819 if (entry->flags & PHAR_ENT_COMPRESSED_GZ) { in phar_zip_changed_apply()
824 if (entry->flags & PHAR_ENT_COMPRESSED_BZ2) { in phar_zip_changed_apply()
830 phar_zip_u2d_time(entry->timestamp, local.timestamp, local.datestamp); in phar_zip_changed_apply()
833 PHAR_SET_16(central.filename_len, entry->filename_len + (entry->is_dir ? 1 : 0)); in phar_zip_changed_apply()
834 PHAR_SET_16(local.filename_len, entry->filename_len + (entry->is_dir ? 1 : 0)); in phar_zip_changed_apply()
838 if (entry->is_modified) { in phar_zip_changed_apply()
843 if (entry->is_dir) { in phar_zip_changed_apply()
844 entry->is_modified = 0; in phar_zip_changed_apply()
845 … if (entry->fp_type == PHAR_MOD && entry->fp != entry->phar->fp && entry->fp != entry->phar->ufp) { in phar_zip_changed_apply()
846 php_stream_close(entry->fp); in phar_zip_changed_apply()
847 entry->fp = NULL; in phar_zip_changed_apply()
848 entry->fp_type = PHAR_FP; in phar_zip_changed_apply()
853 if (FAILURE == phar_open_entry_fp(entry, p->error, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
854 … to open file contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
859 …if (entry->flags & PHAR_ENT_COMPRESSION_MASK && (entry->old_flags == entry->flags || !entry->old_f… in phar_zip_changed_apply()
864 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
865 …nable to seek to start of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
869 efp = phar_get_efp(entry, 0 TSRMLS_CC); in phar_zip_changed_apply()
872 for (loc = 0;loc < entry->uncompressed_filesize; ++loc) { in phar_zip_changed_apply()
876 entry->crc32 = ~newcrc32; in phar_zip_changed_apply()
877 PHAR_SET_32(central.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
878 PHAR_SET_32(local.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
880 if (!(entry->flags & PHAR_ENT_COMPRESSION_MASK)) { in phar_zip_changed_apply()
882 entry->compressed_filesize = entry->uncompressed_filesize; in phar_zip_changed_apply()
883 PHAR_SET_32(central.compsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
884 PHAR_SET_32(local.compsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
888 filter = php_stream_filter_create(phar_compress_filter(entry, 0), NULL, 0 TSRMLS_CC); in phar_zip_changed_apply()
891 if (entry->flags & PHAR_ENT_COMPRESSED_GZ) { in phar_zip_changed_apply()
892 … "unable to gzip compress file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
894 …"unable to bzip2 compress file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
902 entry->cfp = php_stream_fopen_tmpfile(); in phar_zip_changed_apply()
904 if (!entry->cfp) { in phar_zip_changed_apply()
905 …rary file for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
911 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
912 …nable to seek to start of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
916 php_stream_filter_append((&entry->cfp->writefilters), filter); in phar_zip_changed_apply()
918 if (SUCCESS != phar_stream_copy_to_stream(efp, entry->cfp, entry->uncompressed_filesize, NULL)) { in phar_zip_changed_apply()
919 …ed file contents of file \"%s\" while creating new phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
924 php_stream_flush(entry->cfp); in phar_zip_changed_apply()
926 php_stream_seek(entry->cfp, 0, SEEK_END); in phar_zip_changed_apply()
927 entry->compressed_filesize = (php_uint32) php_stream_tell(entry->cfp); in phar_zip_changed_apply()
928 PHAR_SET_32(central.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
929 PHAR_SET_32(local.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
931 php_stream_rewind(entry->cfp); in phar_zip_changed_apply()
932 entry->old_flags = entry->flags; in phar_zip_changed_apply()
933 entry->is_modified = 1; in phar_zip_changed_apply()
936 PHAR_SET_32(central.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
937 PHAR_SET_32(local.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
938 PHAR_SET_32(central.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
939 PHAR_SET_32(local.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
941 if (-1 == php_stream_seek(p->old, entry->offset_abs, SEEK_SET)) { in phar_zip_changed_apply()
942 …k to start of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
948 PHAR_SET_32(central.crc32, entry->crc32); in phar_zip_changed_apply()
949 PHAR_SET_32(local.crc32, entry->crc32); in phar_zip_changed_apply()
952 if (entry->metadata) { in phar_zip_changed_apply()
955 if (entry->metadata_str.c) { in phar_zip_changed_apply()
956 smart_str_free(&entry->metadata_str); in phar_zip_changed_apply()
958 entry->metadata_str.c = 0; in phar_zip_changed_apply()
959 entry->metadata_str.len = 0; in phar_zip_changed_apply()
961 php_var_serialize(&entry->metadata_str, &entry->metadata, &metadata_hash TSRMLS_CC); in phar_zip_changed_apply()
963 PHAR_SET_16(central.comment_len, entry->metadata_str.len); in phar_zip_changed_apply()
966 entry->header_offset = php_stream_tell(p->filefp); in phar_zip_changed_apply()
967 …offset = entry->header_offset + sizeof(local) + entry->filename_len + (entry->is_dir ? 1 : 0) + si… in phar_zip_changed_apply()
970 …rite local file header of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
975 …ory entry for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
979 if (entry->is_dir) { in phar_zip_changed_apply()
980 if (entry->filename_len != php_stream_write(p->filefp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
981 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
986 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
990 if (entry->filename_len != php_stream_write(p->centralfp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
991 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
996 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1000 if (entry->filename_len != php_stream_write(p->filefp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
1001 …ory entry for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1005 if (entry->filename_len != php_stream_write(p->centralfp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
1006 …ory entry for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1012 …ermissions file header of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1017 …ermissions file header of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1021 if (!not_really_modified && entry->is_modified) { in phar_zip_changed_apply()
1022 if (entry->cfp) { in phar_zip_changed_apply()
1023 …if (SUCCESS != phar_stream_copy_to_stream(entry->cfp, p->filefp, entry->compressed_filesize, NULL)… in phar_zip_changed_apply()
1024 …te compressed contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1028 php_stream_close(entry->cfp); in phar_zip_changed_apply()
1029 entry->cfp = NULL; in phar_zip_changed_apply()
1031 if (FAILURE == phar_open_entry_fp(entry, p->error, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
1035 phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC); in phar_zip_changed_apply()
1037 …if (SUCCESS != phar_stream_copy_to_stream(phar_get_efp(entry, 0 TSRMLS_CC), p->filefp, entry->unco… in phar_zip_changed_apply()
1038 …able to write contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1043 …if (entry->fp_type == PHAR_MOD && entry->fp != entry->phar->fp && entry->fp != entry->phar->ufp &&… in phar_zip_changed_apply()
1044 php_stream_close(entry->fp); in phar_zip_changed_apply()
1047 entry->is_modified = 0; in phar_zip_changed_apply()
1049 entry->is_modified = 0; in phar_zip_changed_apply()
1050 if (entry->fp_refcount) { in phar_zip_changed_apply()
1052 switch (entry->fp_type) { in phar_zip_changed_apply()
1063 …if (!entry->is_dir && entry->compressed_filesize && SUCCESS != phar_stream_copy_to_stream(p->old, … in phar_zip_changed_apply()
1064 …y contents of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1069 entry->fp = NULL; in phar_zip_changed_apply()
1070 entry->offset = entry->offset_abs = offset; in phar_zip_changed_apply()
1071 entry->fp_type = PHAR_FP; in phar_zip_changed_apply()
1073 if (entry->metadata_str.c) { in phar_zip_changed_apply()
1074 …if (entry->metadata_str.len != php_stream_write(p->centralfp, entry->metadata_str.c, entry->metada… in phar_zip_changed_apply()
1075 …e comment for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1076 smart_str_free(&entry->metadata_str); in phar_zip_changed_apply()
1080 smart_str_free(&entry->metadata_str); in phar_zip_changed_apply()
1094 phar_entry_info entry = {0}; in phar_zip_applysignature() local
1125 entry.filename = ".phar/signature.bin"; in phar_zip_applysignature()
1126 entry.filename_len = sizeof(".phar/signature.bin")-1; in phar_zip_applysignature()
1127 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_applysignature()
1128 entry.fp_type = PHAR_MOD; in phar_zip_applysignature()
1129 entry.is_modified = 1; in phar_zip_applysignature()
1130 if (entry.fp == NULL) { in phar_zip_applysignature()
1138 …if (8 != (int)php_stream_write(entry.fp, sigbuf, 8) || signature_length != (int)php_stream_write(e… in phar_zip_applysignature()
1149 entry.uncompressed_filesize = entry.compressed_filesize = signature_length + 8; in phar_zip_applysignature()
1150 entry.phar = phar; in phar_zip_applysignature()
1152 phar_zip_changed_apply((void *)&entry, (void *)pass TSRMLS_CC); in phar_zip_applysignature()
1176 phar_entry_info entry = {0}; in phar_zip_flush() local
1183 entry.flags = PHAR_ENT_PERM_DEF_FILE; in phar_zip_flush()
1184 entry.timestamp = time(NULL); in phar_zip_flush()
1185 entry.is_modified = 1; in phar_zip_flush()
1186 entry.is_zip = 1; in phar_zip_flush()
1187 entry.phar = phar; in phar_zip_flush()
1188 entry.fp_type = PHAR_MOD; in phar_zip_flush()
1203 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1204 if (entry.fp == NULL) { in phar_zip_flush()
1208 if (phar->alias_len != (int)php_stream_write(entry.fp, phar->alias, phar->alias_len)) { in phar_zip_flush()
1215 entry.uncompressed_filesize = entry.compressed_filesize = phar->alias_len; in phar_zip_flush()
1216 entry.filename = estrndup(".phar/alias.txt", sizeof(".phar/alias.txt")-1); in phar_zip_flush()
1217 entry.filename_len = sizeof(".phar/alias.txt")-1; in phar_zip_flush()
1219 …if (SUCCESS != zend_hash_update(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry in phar_zip_flush()
1281 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1282 if (entry.fp == NULL) { in phar_zip_flush()
1286 entry.uncompressed_filesize = len + 5; in phar_zip_flush()
1288 if ((size_t)len != php_stream_write(entry.fp, user_stub, len) in phar_zip_flush()
1289 || 5 != php_stream_write(entry.fp, " ?>\r\n", 5)) { in phar_zip_flush()
1296 php_stream_close(entry.fp); in phar_zip_flush()
1300 entry.filename = estrndup(".phar/stub.php", sizeof(".phar/stub.php")-1); in phar_zip_flush()
1301 entry.filename_len = sizeof(".phar/stub.php")-1; in phar_zip_flush()
1303 …if (SUCCESS != zend_hash_update(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry in phar_zip_flush()
1318 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1319 if (entry.fp == NULL) { in phar_zip_flush()
1323 if (sizeof(newstub)-1 != php_stream_write(entry.fp, newstub, sizeof(newstub)-1)) { in phar_zip_flush()
1324 php_stream_close(entry.fp); in phar_zip_flush()
1331 entry.uncompressed_filesize = entry.compressed_filesize = sizeof(newstub) - 1; in phar_zip_flush()
1332 entry.filename = estrndup(".phar/stub.php", sizeof(".phar/stub.php")-1); in phar_zip_flush()
1333 entry.filename_len = sizeof(".phar/stub.php")-1; in phar_zip_flush()
1337 …if (SUCCESS != zend_hash_add(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry, s… in phar_zip_flush()
1338 php_stream_close(entry.fp); in phar_zip_flush()
1339 efree(entry.filename); in phar_zip_flush()
1346 php_stream_close(entry.fp); in phar_zip_flush()
1347 efree(entry.filename); in phar_zip_flush()
1350 …if (SUCCESS != zend_hash_update(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry in phar_zip_flush()
1351 php_stream_close(entry.fp); in phar_zip_flush()
1352 efree(entry.filename); in phar_zip_flush()