Lines Matching full:eocd
62 // The maximum number of bytes to scan backwards for the EOCD start.
173 * Scan backward for the EOCD magic. In an archive without a trailing
183 ALOGV("+++ Found EOCD at buf+%d", i);
189 ALOGD("Zip: EOCD not found, %s is not zip", debug_file_name);
194 const EocdRecord* eocd = reinterpret_cast<const EocdRecord*>(scan_buffer + i);
199 const off64_t calculated_length = eocd_offset + sizeof(EocdRecord) + eocd->comment_length;
210 if (static_cast<off64_t>(eocd->cd_start_offset) + eocd->cd_size > eocd_offset) {
211 ALOGW("Zip: bad offsets (dir %" PRIu32 ", size %" PRIu32 ", eocd %" PRId64 ")",
212 eocd->cd_start_offset, eocd->cd_size, static_cast<int64_t>(eocd_offset));
214 if (eocd->cd_start_offset + eocd->cd_size <= eocd_offset) {
220 if (eocd->num_records == 0) {
225 ALOGV("+++ num_entries=%" PRIu32 " dir_size=%" PRIu32 " dir_offset=%" PRIu32, eocd->num_records,
226 eocd->cd_size, eocd->cd_start_offset);
234 static_cast<off64_t>(eocd->cd_start_offset),
235 static_cast<size_t>(eocd->cd_size))) {
240 archive->num_entries = eocd->num_records;
241 archive->directory_offset = eocd->cd_start_offset;
249 * On success, returns 0 after populating fields from the EOCD area:
274 * Perform the traditional EOCD snipe hunt.
277 * which appears at the start of the EOCD block. It's followed by
278 * 18 bytes of EOCD stuff and up to 64KB of archive comment. We