mirror of
https://github.com/expo/bsdiff.git
synced 2026-11-13 20:11:27 -10:00
Merge "Exit loop earlier for bsdiff's pathological case" am: d3f0369732 am: 6fd01a93b5 am: 1eec465beb
Original change: https://android-review.googlesource.com/c/platform/external/bsdiff/+/2627658 Change-Id: Id2f674456eddf42346c44baf3203d9dcc7936bd5 Signed-off-by: Automerger Merge Worker <[email protected]>
This commit is contained in:
commit
f4333a2fa9
2 files changed
+2
-5
No files matched your search
@@ -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
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user