Merge "applypatch: Add determine the return value of ApplyDiffPatch and capture the error flow." am: ac78ed8915 am: 282c863524
am: 3dcc24490b
Change-Id: I7ce76a10f42079cfa1d5f4890b9347edecd4bb24
This commit is contained in:
@@ -100,7 +100,10 @@ int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value*
|
|||||||
printf("source data too short\n");
|
printf("source data too short\n");
|
||||||
return -1;
|
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) {
|
} else if (type == CHUNK_RAW) {
|
||||||
const char* raw_header = &patch->data[pos];
|
const char* raw_header = &patch->data[pos];
|
||||||
pos += 4;
|
pos += 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user