Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 282c8635 authored by Tao Bao's avatar Tao Bao Committed by android-build-merger
Browse files

Merge "applypatch: Add determine the return value of ApplyDiffPatch and capture the error flow."

am: ac78ed89

Change-Id: I7acad8d3ce6a71554e93d785e6a7e307e2c9f9fe
parents f849ff34 ac78ed89
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -100,7 +100,10 @@ int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value*
        printf("source data too short\n");
        return -1;
      }
      ApplyBSDiffPatch(old_data + src_start, src_len, patch, patch_offset, sink, ctx);
      if (ApplyBSDiffPatch(old_data + src_start, src_len, patch, patch_offset, sink, ctx) != 0) {
        printf("Failed to apply bsdiff patch.\n");
        return -1;
      }
    } else if (type == CHUNK_RAW) {
      const char* raw_header = &patch->data[pos];
      pos += 4;