Merge "Exit loop earlier for bsdiff's pathological case" am: d3f0369732 am: 6fd01a93b5 am: 1eec465beb am: f4333a2fa9

Original change: https://android-review.googlesource.com/c/platform/external/bsdiff/+/2627658

Change-Id: Ib530205442b49e677dc22e6f9e801861c87f3761
Signed-off-by: Automerger Merge Worker <[email protected]>
This commit is contained in:
Treehugger Robot authored and Automerger Merge Worker committed 2023-06-16 01:15:40 +00:00
commit 6b68780b1f
2 files changed
+2 -5

No files matched your search

+1 -1
View File
@@ -119,7 +119,7 @@ int bsdiff(const uint8_t* old_buf, size_t oldsize, const uint8_t* new_buf,
oldscore++;
if(((len==oldscore) && (len!=0)) ||
(len>oldscore+8 && len>=min_length)) break;
(len>=oldscore+8 && len>=min_length)) break;
if((scan+lastoffset<oldsize) &&
(old_buf[scan+lastoffset] == new_buf[scan]))
+1 -4
View File
@@ -13,10 +13,6 @@
#include "bsdiff/control_entry.h"
#include "bsdiff/logging.h"
namespace {
} // namespace
namespace bsdiff {
@@ -43,6 +39,7 @@ bool BsdiffPatchWriter::InitializeCompressorList(
LOG(ERROR) << "Patch writer expects at least one compressor.";
return false;
}
compressor_list->clear();
for (const auto& type : types_) {
switch (type) {