commit | dbbbb17c1dce008ed267604583efedaae2b73da2 | [log] [tgz] |
---|---|---|
author | David Anderson <dvander@google.com> | Wed Dec 05 19:35:56 2018 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Dec 05 19:35:56 2018 +0000 |
tree | bda5528a77747174280280b393314168c8f505cc | |
parent | 5ae47e10c82be1889a8d86f28f37302aaefcd306 [diff] | |
parent | 0047580398881ed218166a28088df3cb1931d33c [diff] |
Merge "fastboot: Check if super_empty.img exists before reading it."
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index fee0857..b717aef 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp
@@ -1541,7 +1541,7 @@ return false; } auto path = find_item_given_name("super_empty.img"); - if (path.empty()) { + if (path.empty() || access(path.c_str(), R_OK)) { return false; } auto metadata = android::fs_mgr::ReadFromImageFile(path);