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 if(entry.filename_len > 1) { in phar_parse_zipfile()
400 entry.filename_len--; in phar_parse_zipfile()
402 entry.flags |= PHAR_ENT_PERM_DEF_DIR; in phar_parse_zipfile()
404 entry.is_dir = 0; in phar_parse_zipfile()
407 …if (entry.filename_len == sizeof(".phar/signature.bin")-1 && !strncmp(entry.filename, ".phar/signa… in phar_parse_zipfile()
414 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
422 phar_stream_copy_to_stream(fp, sigfile, entry.header_offset, NULL); in phar_parse_zipfile()
430 …php_stream_seek(fp, sizeof(phar_zip_file_header) + entry.header_offset + entry.filename_len + PHAR… in phar_parse_zipfile()
431 sig = (char *) emalloc(entry.uncompressed_filesize); in phar_parse_zipfile()
432 read = php_stream_read(fp, sig, entry.uncompressed_filesize); in phar_parse_zipfile()
433 if (read != entry.uncompressed_filesize) { in phar_parse_zipfile()
439 …_signature(sigfile, php_stream_tell(sigfile), mydata->sig_flags, sig + 8, entry.uncompressed_files… in phar_parse_zipfile()
462 phar_add_virtual_dirs(mydata, entry.filename, entry.filename_len TSRMLS_CC); in phar_parse_zipfile()
466 if (FAILURE == phar_zip_process_extra(fp, &entry, PHAR_GET_16(zipentry.extra_len) TSRMLS_CC)) { in phar_parse_zipfile()
467 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
478 entry.flags |= PHAR_ENT_COMPRESSED_GZ; in phar_parse_zipfile()
480 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
485 entry.flags |= PHAR_ENT_COMPRESSED_BZ2; in phar_parse_zipfile()
487 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
492 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
498 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
501 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
504 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
507 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
510 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
513 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
516 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
519 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
522 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
525 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
528 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
535 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
540 entry.metadata_len = PHAR_GET_16(zipentry.comment_len); in phar_parse_zipfile()
542 …if (phar_parse_metadata(&p, &(entry.metadata), PHAR_GET_16(zipentry.comment_len) TSRMLS_CC) == FAI… in phar_parse_zipfile()
543 entry.metadata_len = 0; in phar_parse_zipfile()
546 if (entry.is_persistent) { in phar_parse_zipfile()
547 ALLOC_PERMANENT_ZVAL(entry.metadata); in phar_parse_zipfile()
549 ALLOC_ZVAL(entry.metadata); in phar_parse_zipfile()
552 INIT_ZVAL(*entry.metadata); in phar_parse_zipfile()
553 …ZVAL_STRINGL(entry.metadata, pestrndup(buf, PHAR_GET_16(zipentry.comment_len), entry.is_persistent… in phar_parse_zipfile()
556 entry.metadata = NULL; in phar_parse_zipfile()
559 …if (!actual_alias && entry.filename_len == sizeof(".phar/alias.txt")-1 && !strncmp(entry.filename,… in phar_parse_zipfile()
570 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
575entry.filename_len != PHAR_GET_16(local.filename_len) || entry.crc32 != PHAR_GET_32(local.crc32) |… in phar_parse_zipfile()
576 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
581 entry.offset = entry.offset_abs = in phar_parse_zipfile()
582 …sizeof(local) + entry.header_offset + PHAR_GET_16(local.filename_len) + PHAR_GET_16(local.extra_le… in phar_parse_zipfile()
583 php_stream_seek(fp, entry.offset, SEEK_SET); in phar_parse_zipfile()
587 php_stream_seek(fp, entry.offset, SEEK_SET); in phar_parse_zipfile()
592 mydata->alias_len = entry.uncompressed_filesize; in phar_parse_zipfile()
594 if (entry.flags & PHAR_ENT_COMPRESSED_GZ) { in phar_parse_zipfile()
598 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
604 …if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_f… in phar_parse_zipfile()
605 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
612 } else if (entry.flags & PHAR_ENT_COMPRESSED_BZ2) { in phar_parse_zipfile()
616 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
622 …if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_f… in phar_parse_zipfile()
623 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
630 …if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_f… in phar_parse_zipfile()
631 pefree(entry.filename, entry.is_persistent); in phar_parse_zipfile()
640 phar_set_inode(&entry TSRMLS_CC); in phar_parse_zipfile()
641 …zend_hash_add(&mydata->manifest, entry.filename, entry.filename_len, (void *)&entry,sizeof(phar_en… in phar_parse_zipfile()
679 …mydata->alias = entry.is_persistent ? pestrndup(actual_alias, mydata->alias_len, 1) : actual_alias; in phar_parse_zipfile()
681 if (entry.is_persistent) { in phar_parse_zipfile()
768 phar_entry_info *entry; in phar_zip_changed_apply() local
776 entry = (phar_entry_info *)data; in phar_zip_changed_apply()
779 if (entry->is_mounted) { in phar_zip_changed_apply()
783 if (entry->is_deleted) { in phar_zip_changed_apply()
784 if (entry->fp_refcount <= 0) { in phar_zip_changed_apply()
792 phar_add_virtual_dirs(entry->phar, entry->filename, entry->filename_len TSRMLS_CC); in phar_zip_changed_apply()
803 PHAR_SET_16(perms.perms, entry->flags & PHAR_ENT_PERM_MASK); in phar_zip_changed_apply()
811 if (entry->flags & PHAR_ENT_COMPRESSED_GZ) { in phar_zip_changed_apply()
816 if (entry->flags & PHAR_ENT_COMPRESSED_BZ2) { in phar_zip_changed_apply()
822 phar_zip_u2d_time(entry->timestamp, local.timestamp, local.datestamp); in phar_zip_changed_apply()
825 PHAR_SET_16(central.filename_len, entry->filename_len + (entry->is_dir ? 1 : 0)); in phar_zip_changed_apply()
826 PHAR_SET_16(local.filename_len, entry->filename_len + (entry->is_dir ? 1 : 0)); in phar_zip_changed_apply()
830 if (entry->is_modified) { in phar_zip_changed_apply()
835 if (entry->is_dir) { in phar_zip_changed_apply()
836 entry->is_modified = 0; in phar_zip_changed_apply()
837 … if (entry->fp_type == PHAR_MOD && entry->fp != entry->phar->fp && entry->fp != entry->phar->ufp) { in phar_zip_changed_apply()
838 php_stream_close(entry->fp); in phar_zip_changed_apply()
839 entry->fp = NULL; in phar_zip_changed_apply()
840 entry->fp_type = PHAR_FP; in phar_zip_changed_apply()
845 if (FAILURE == phar_open_entry_fp(entry, p->error, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
846 … to open file contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
851 …if (entry->flags & PHAR_ENT_COMPRESSION_MASK && (entry->old_flags == entry->flags || !entry->old_f… in phar_zip_changed_apply()
856 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
857 …nable to seek to start of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
861 efp = phar_get_efp(entry, 0 TSRMLS_CC); in phar_zip_changed_apply()
864 for (loc = 0;loc < entry->uncompressed_filesize; ++loc) { in phar_zip_changed_apply()
868 entry->crc32 = ~newcrc32; in phar_zip_changed_apply()
869 PHAR_SET_32(central.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
870 PHAR_SET_32(local.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
872 if (!(entry->flags & PHAR_ENT_COMPRESSION_MASK)) { in phar_zip_changed_apply()
874 entry->compressed_filesize = entry->uncompressed_filesize; in phar_zip_changed_apply()
875 PHAR_SET_32(central.compsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
876 PHAR_SET_32(local.compsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
880 filter = php_stream_filter_create(phar_compress_filter(entry, 0), NULL, 0 TSRMLS_CC); in phar_zip_changed_apply()
883 if (entry->flags & PHAR_ENT_COMPRESSED_GZ) { in phar_zip_changed_apply()
884 … "unable to gzip compress file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
886 …"unable to bzip2 compress file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
894 entry->cfp = php_stream_fopen_tmpfile(); in phar_zip_changed_apply()
896 if (!entry->cfp) { in phar_zip_changed_apply()
897 …rary file for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
903 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
904 …nable to seek to start of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
908 php_stream_filter_append((&entry->cfp->writefilters), filter); in phar_zip_changed_apply()
910 if (SUCCESS != phar_stream_copy_to_stream(efp, entry->cfp, entry->uncompressed_filesize, NULL)) { in phar_zip_changed_apply()
911 …ed file contents of file \"%s\" while creating new phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
916 php_stream_flush(entry->cfp); in phar_zip_changed_apply()
918 php_stream_seek(entry->cfp, 0, SEEK_END); in phar_zip_changed_apply()
919 entry->compressed_filesize = (php_uint32) php_stream_tell(entry->cfp); in phar_zip_changed_apply()
920 PHAR_SET_32(central.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
921 PHAR_SET_32(local.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
923 php_stream_rewind(entry->cfp); in phar_zip_changed_apply()
924 entry->old_flags = entry->flags; in phar_zip_changed_apply()
925 entry->is_modified = 1; in phar_zip_changed_apply()
928 PHAR_SET_32(central.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
929 PHAR_SET_32(local.uncompsize, entry->uncompressed_filesize); in phar_zip_changed_apply()
930 PHAR_SET_32(central.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
931 PHAR_SET_32(local.compsize, entry->compressed_filesize); in phar_zip_changed_apply()
933 if (-1 == php_stream_seek(p->old, entry->offset_abs, SEEK_SET)) { in phar_zip_changed_apply()
934 …k to start of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
940 PHAR_SET_32(central.crc32, entry->crc32); in phar_zip_changed_apply()
941 PHAR_SET_32(local.crc32, entry->crc32); in phar_zip_changed_apply()
944 if (entry->metadata) { in phar_zip_changed_apply()
947 if (entry->metadata_str.c) { in phar_zip_changed_apply()
948 smart_str_free(&entry->metadata_str); in phar_zip_changed_apply()
950 entry->metadata_str.c = 0; in phar_zip_changed_apply()
951 entry->metadata_str.len = 0; in phar_zip_changed_apply()
953 php_var_serialize(&entry->metadata_str, &entry->metadata, &metadata_hash TSRMLS_CC); in phar_zip_changed_apply()
955 PHAR_SET_16(central.comment_len, entry->metadata_str.len); in phar_zip_changed_apply()
958 entry->header_offset = php_stream_tell(p->filefp); in phar_zip_changed_apply()
959 …offset = entry->header_offset + sizeof(local) + entry->filename_len + (entry->is_dir ? 1 : 0) + si… in phar_zip_changed_apply()
962 …rite local file header of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
967 …ory entry for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
971 if (entry->is_dir) { in phar_zip_changed_apply()
972 if (entry->filename_len != php_stream_write(p->filefp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
973 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
978 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
982 if (entry->filename_len != php_stream_write(p->centralfp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
983 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
988 …ntry for directory \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
992 if (entry->filename_len != php_stream_write(p->filefp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
993 …ory entry for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
997 if (entry->filename_len != php_stream_write(p->centralfp, entry->filename, entry->filename_len)) { in phar_zip_changed_apply()
998 …ory entry for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1004 …ermissions file header of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1009 …ermissions file header of file \"%s\" to zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1013 if (!not_really_modified && entry->is_modified) { in phar_zip_changed_apply()
1014 if (entry->cfp) { in phar_zip_changed_apply()
1015 …if (SUCCESS != phar_stream_copy_to_stream(entry->cfp, p->filefp, entry->compressed_filesize, NULL)… in phar_zip_changed_apply()
1016 …te compressed contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1020 php_stream_close(entry->cfp); in phar_zip_changed_apply()
1021 entry->cfp = NULL; in phar_zip_changed_apply()
1023 if (FAILURE == phar_open_entry_fp(entry, p->error, 0 TSRMLS_CC)) { in phar_zip_changed_apply()
1027 phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC); in phar_zip_changed_apply()
1029 …if (SUCCESS != phar_stream_copy_to_stream(phar_get_efp(entry, 0 TSRMLS_CC), p->filefp, entry->unco… in phar_zip_changed_apply()
1030 …able to write contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1035 …if (entry->fp_type == PHAR_MOD && entry->fp != entry->phar->fp && entry->fp != entry->phar->ufp &&… in phar_zip_changed_apply()
1036 php_stream_close(entry->fp); in phar_zip_changed_apply()
1039 entry->is_modified = 0; in phar_zip_changed_apply()
1041 entry->is_modified = 0; in phar_zip_changed_apply()
1042 if (entry->fp_refcount) { in phar_zip_changed_apply()
1044 switch (entry->fp_type) { in phar_zip_changed_apply()
1055 …if (!entry->is_dir && entry->compressed_filesize && SUCCESS != phar_stream_copy_to_stream(p->old, … in phar_zip_changed_apply()
1056 …y contents of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1061 entry->fp = NULL; in phar_zip_changed_apply()
1062 entry->offset = entry->offset_abs = offset; in phar_zip_changed_apply()
1063 entry->fp_type = PHAR_FP; in phar_zip_changed_apply()
1065 if (entry->metadata_str.c) { in phar_zip_changed_apply()
1066 …if (entry->metadata_str.len != php_stream_write(p->centralfp, entry->metadata_str.c, entry->metada… in phar_zip_changed_apply()
1067 …e comment for file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fna… in phar_zip_changed_apply()
1068 smart_str_free(&entry->metadata_str); in phar_zip_changed_apply()
1072 smart_str_free(&entry->metadata_str); in phar_zip_changed_apply()
1086 phar_entry_info entry = {0}; in phar_zip_applysignature() local
1117 entry.filename = ".phar/signature.bin"; in phar_zip_applysignature()
1118 entry.filename_len = sizeof(".phar/signature.bin")-1; in phar_zip_applysignature()
1119 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_applysignature()
1120 entry.fp_type = PHAR_MOD; in phar_zip_applysignature()
1121 entry.is_modified = 1; in phar_zip_applysignature()
1122 if (entry.fp == NULL) { in phar_zip_applysignature()
1130 …if (8 != (int)php_stream_write(entry.fp, sigbuf, 8) || signature_length != (int)php_stream_write(e… in phar_zip_applysignature()
1141 entry.uncompressed_filesize = entry.compressed_filesize = signature_length + 8; in phar_zip_applysignature()
1142 entry.phar = phar; in phar_zip_applysignature()
1144 phar_zip_changed_apply((void *)&entry, (void *)pass TSRMLS_CC); in phar_zip_applysignature()
1168 phar_entry_info entry = {0}; in phar_zip_flush() local
1175 entry.flags = PHAR_ENT_PERM_DEF_FILE; in phar_zip_flush()
1176 entry.timestamp = time(NULL); in phar_zip_flush()
1177 entry.is_modified = 1; in phar_zip_flush()
1178 entry.is_zip = 1; in phar_zip_flush()
1179 entry.phar = phar; in phar_zip_flush()
1180 entry.fp_type = PHAR_MOD; in phar_zip_flush()
1195 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1196 if (entry.fp == NULL) { in phar_zip_flush()
1200 if (phar->alias_len != (int)php_stream_write(entry.fp, phar->alias, phar->alias_len)) { in phar_zip_flush()
1207 entry.uncompressed_filesize = entry.compressed_filesize = phar->alias_len; in phar_zip_flush()
1208 entry.filename = estrndup(".phar/alias.txt", sizeof(".phar/alias.txt")-1); in phar_zip_flush()
1209 entry.filename_len = sizeof(".phar/alias.txt")-1; in phar_zip_flush()
1211 …if (SUCCESS != zend_hash_update(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry in phar_zip_flush()
1273 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1274 if (entry.fp == NULL) { in phar_zip_flush()
1278 entry.uncompressed_filesize = len + 5; in phar_zip_flush()
1280 if ((size_t)len != php_stream_write(entry.fp, user_stub, len) in phar_zip_flush()
1281 || 5 != php_stream_write(entry.fp, " ?>\r\n", 5)) { in phar_zip_flush()
1288 php_stream_close(entry.fp); in phar_zip_flush()
1292 entry.filename = estrndup(".phar/stub.php", sizeof(".phar/stub.php")-1); in phar_zip_flush()
1293 entry.filename_len = sizeof(".phar/stub.php")-1; in phar_zip_flush()
1295 …if (SUCCESS != zend_hash_update(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry in phar_zip_flush()
1310 entry.fp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1311 if (entry.fp == NULL) { in phar_zip_flush()
1315 if (sizeof(newstub)-1 != php_stream_write(entry.fp, newstub, sizeof(newstub)-1)) { in phar_zip_flush()
1316 php_stream_close(entry.fp); in phar_zip_flush()
1323 entry.uncompressed_filesize = entry.compressed_filesize = sizeof(newstub) - 1; in phar_zip_flush()
1324 entry.filename = estrndup(".phar/stub.php", sizeof(".phar/stub.php")-1); in phar_zip_flush()
1325 entry.filename_len = sizeof(".phar/stub.php")-1; in phar_zip_flush()
1329 …if (SUCCESS != zend_hash_add(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry, s… in phar_zip_flush()
1330 php_stream_close(entry.fp); in phar_zip_flush()
1331 efree(entry.filename); in phar_zip_flush()
1338 php_stream_close(entry.fp); in phar_zip_flush()
1339 efree(entry.filename); in phar_zip_flush()
1342 …if (SUCCESS != zend_hash_update(&phar->manifest, entry.filename, entry.filename_len, (void*)&entry in phar_zip_flush()
1343 php_stream_close(entry.fp); in phar_zip_flush()
1344 efree(entry.filename); in phar_zip_flush()