Lines Matching refs:zde
210 _zip_dirent_finalize(zip_dirent_t *zde) in _zip_dirent_finalize() argument
212 if (!zde->cloned || zde->changed & ZIP_DIRENT_FILENAME) { in _zip_dirent_finalize()
213 _zip_string_free(zde->filename); in _zip_dirent_finalize()
214 zde->filename = NULL; in _zip_dirent_finalize()
216 if (!zde->cloned || zde->changed & ZIP_DIRENT_EXTRA_FIELD) { in _zip_dirent_finalize()
217 _zip_ef_free(zde->extra_fields); in _zip_dirent_finalize()
218 zde->extra_fields = NULL; in _zip_dirent_finalize()
220 if (!zde->cloned || zde->changed & ZIP_DIRENT_COMMENT) { in _zip_dirent_finalize()
221 _zip_string_free(zde->comment); in _zip_dirent_finalize()
222 zde->comment = NULL; in _zip_dirent_finalize()
228 _zip_dirent_free(zip_dirent_t *zde) in _zip_dirent_free() argument
230 if (zde == NULL) in _zip_dirent_free()
233 _zip_dirent_finalize(zde); in _zip_dirent_free()
234 free(zde); in _zip_dirent_free()
298 _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, bool local, zip_error_… in _zip_dirent_read() argument
331 _zip_dirent_init(zde); in _zip_dirent_read()
333 zde->version_madeby = _zip_buffer_get_16(buffer); in _zip_dirent_read()
335 zde->version_madeby = 0; in _zip_dirent_read()
336 zde->version_needed = _zip_buffer_get_16(buffer); in _zip_dirent_read()
337 zde->bitflags = _zip_buffer_get_16(buffer); in _zip_dirent_read()
338 zde->comp_method = _zip_buffer_get_16(buffer); in _zip_dirent_read()
343 zde->last_mod = _zip_d2u_time(dostime, dosdate); in _zip_dirent_read()
345 zde->crc = _zip_buffer_get_32(buffer); in _zip_dirent_read()
346 zde->comp_size = _zip_buffer_get_32(buffer); in _zip_dirent_read()
347 zde->uncomp_size = _zip_buffer_get_32(buffer); in _zip_dirent_read()
354 zde->disk_number = 0; in _zip_dirent_read()
355 zde->int_attrib = 0; in _zip_dirent_read()
356 zde->ext_attrib = 0; in _zip_dirent_read()
357 zde->offset = 0; in _zip_dirent_read()
360 zde->disk_number = _zip_buffer_get_16(buffer); in _zip_dirent_read()
361 zde->int_attrib = _zip_buffer_get_16(buffer); in _zip_dirent_read()
362 zde->ext_attrib = _zip_buffer_get_32(buffer); in _zip_dirent_read()
363 zde->offset = _zip_buffer_get_32(buffer); in _zip_dirent_read()
374 zde->filename = NULL; in _zip_dirent_read()
375 zde->extra_fields = NULL; in _zip_dirent_read()
376 zde->comment = NULL; in _zip_dirent_read()
395 zde->filename = _zip_read_string(buffer, src, filename_len, 1, error); in _zip_dirent_read()
396 if (!zde->filename) { in _zip_dirent_read()
406 if (zde->bitflags & ZIP_GPBF_ENCODING_UTF_8) { in _zip_dirent_read()
407 if (_zip_guess_encoding(zde->filename, ZIP_ENCODING_UTF8_KNOWN) == ZIP_ENCODING_ERROR) { in _zip_dirent_read()
426 …if (!_zip_ef_parse(ef, ef_len, local ? ZIP_EF_LOCAL : ZIP_EF_CENTRAL, &zde->extra_fields, error)) { in _zip_dirent_read()
435 zde->local_extra_fields_read = 1; in _zip_dirent_read()
439 zde->comment = _zip_read_string(buffer, src, comment_len, 0, error); in _zip_dirent_read()
440 if (!zde->comment) { in _zip_dirent_read()
446 if (zde->bitflags & ZIP_GPBF_ENCODING_UTF_8) { in _zip_dirent_read()
447 if (_zip_guess_encoding(zde->comment, ZIP_ENCODING_UTF8_KNOWN) == ZIP_ENCODING_ERROR) { in _zip_dirent_read()
457 zde->filename = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_NAME, zde->filename); in _zip_dirent_read()
458 zde->comment = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_COMMENT, zde->comment); in _zip_dirent_read()
462 …if (zde->uncomp_size == ZIP_UINT32_MAX || zde->comp_size == ZIP_UINT32_MAX || zde->offset == ZIP_U… in _zip_dirent_read()
465 …const zip_uint8_t *ef = _zip_ef_get_by_id(zde->extra_fields, &got_len, ZIP_EF_ZIP64, 0, local ? ZI… in _zip_dirent_read()
482 if (zde->uncomp_size == ZIP_UINT32_MAX) in _zip_dirent_read()
483 zde->uncomp_size = _zip_buffer_get_64(ef_buffer); in _zip_dirent_read()
489 if (zde->comp_size == ZIP_UINT32_MAX) in _zip_dirent_read()
490 zde->comp_size = _zip_buffer_get_64(ef_buffer); in _zip_dirent_read()
492 if (zde->offset == ZIP_UINT32_MAX) in _zip_dirent_read()
493 zde->offset = _zip_buffer_get_64(ef_buffer); in _zip_dirent_read()
494 if (zde->disk_number == ZIP_UINT16_MAX) in _zip_dirent_read()
495 zde->disk_number = _zip_buffer_get_32(buffer); in _zip_dirent_read()
521 if (zde->offset > ZIP_INT64_MAX) { in _zip_dirent_read()
526 zde->extra_fields = _zip_ef_remove_internal(zde->extra_fields); in _zip_dirent_read()