diff options
author | 2016-03-21 04:58:48 +1100 | |
---|---|---|
committer | 2016-03-21 04:58:48 +1100 | |
commit | f07d5bf4bd5795df3ec951163684a8d7d6f0d238 (patch) | |
tree | 7dc180cd4885b05dd3537f0bfe252a722177bff2 | |
parent | cb231cea0ada42a372cd50a7513c082cb230e5aa (diff) |
Fix boundary check on parsing ZIP ECD
-rw-r--r-- | src/lib/util/unzip.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp index 06ab41aae3a..2751f83ffb6 100644 --- a/src/lib/util/unzip.cpp +++ b/src/lib/util/unzip.cpp @@ -400,7 +400,7 @@ int zip_file_impl::search(std::uint32_t search_crc, const std::string &search_fi { // if we're at or past the end, we're done std::string filename; - while (m_cd_pos <= m_ecd.cd_size) + while ((m_cd_pos + ZIPCFN) <= m_ecd.cd_size) { // extract file header info std::uint8_t const *const raw = &m_cd[0] + m_cd_pos; |