• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revisãoc24dd976544cfd0eed88797d4b0195b9b5614b26 (tree)
Hora2016-10-07 09:04:29
AutorTianjie Xu <xunchang@goog...>
Commiterandroid-build-merger

Mensagem de Log

Fix out of bound access in libziparchive
am: 1ee4892e66

Change-Id: I26b48df5a9d39933b90ac063172b4b4ae8428bfd

Mudança Sumário

Diff

--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -501,9 +501,14 @@ static int32_t MapCentralDirectory0(int fd, const char* debug_file_name,
501501 * Grab the CD offset and size, and the number of entries in the
502502 * archive and verify that they look reasonable.
503503 */
504- if (eocd->cd_start_offset + eocd->cd_size > eocd_offset) {
504+ if (static_cast<off64_t>(eocd->cd_start_offset) + eocd->cd_size > eocd_offset) {
505505 ALOGW("Zip: bad offsets (dir %" PRIu32 ", size %" PRIu32 ", eocd %" PRId64 ")",
506506 eocd->cd_start_offset, eocd->cd_size, static_cast<int64_t>(eocd_offset));
507+#if defined(__ANDROID__)
508+ if (eocd->cd_start_offset + eocd->cd_size <= eocd_offset) {
509+ android_errorWriteLog(0x534e4554, "31251826");
510+ }
511+#endif
507512 return kInvalidOffset;
508513 }
509514 if (eocd->num_records == 0) {