summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJinguang Dong <dongjinguang@huawei.com>2017-04-26 04:40:45 +0200
committerJinguang Dong <dongjinguang@huawei.com>2017-04-26 04:59:57 +0200
commit391bb7bb924a1b0a7990a8a7e2875ee94387e73d (patch)
treeb47d8fd943dd8ea3b3753839d3b9afd5acc8e043
parentMerge "minadbd: Fix a failing test due to SIGPIPE." (diff)
downloadandroid_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.tar
android_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.tar.gz
android_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.tar.bz2
android_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.tar.lz
android_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.tar.xz
android_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.tar.zst
android_bootable_recovery-391bb7bb924a1b0a7990a8a7e2875ee94387e73d.zip
-rw-r--r--applypatch/imgpatch.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/applypatch/imgpatch.cpp b/applypatch/imgpatch.cpp
index 7d8b7361c..3d905f7b4 100644
--- a/applypatch/imgpatch.cpp
+++ b/applypatch/imgpatch.cpp
@@ -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;