summaryrefslogtreecommitdiffstats
path: root/otafault/config.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-08-28 23:15:07 +0200
committerTianjie Xu <xunchang@google.com>2017-08-29 06:56:33 +0200
commitc89d1e7e2a6a8a07bb336db35db88f5452d8a51d (patch)
treebb13d2572bc220a73808f455c5191e62e64c368a /otafault/config.cpp
parentMerge "wear_ui: Remove kMaxCols/kMaxRows/visible_text_rows/menu_headers_." (diff)
downloadandroid_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.tar
android_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.tar.gz
android_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.tar.bz2
android_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.tar.lz
android_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.tar.xz
android_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.tar.zst
android_bootable_recovery-c89d1e7e2a6a8a07bb336db35db88f5452d8a51d.zip
Diffstat (limited to '')
-rw-r--r--otafault/config.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/otafault/config.cpp b/otafault/config.cpp
index 8590833ee..b94e429c6 100644
--- a/otafault/config.cpp
+++ b/otafault/config.cpp
@@ -69,7 +69,9 @@ std::string fault_fname(const char* io_type) {
fname.resize(OTAIO_MAX_FNAME_SIZE);
ZipString zip_type_path(type_path.c_str());
ZipEntry entry;
- int status = FindEntry(archive, zip_type_path, &entry);
+ if (FindEntry(archive, zip_type_path, &entry) != 0) {
+ return {};
+ }
ExtractToMemory(archive, &entry, reinterpret_cast<uint8_t*>(&fname[0]), OTAIO_MAX_FNAME_SIZE);
return fname;
}