commit | 02b4b9f0b051a50fcfb2666953c58a498071a31b | [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 | 39bff7947c53b92e4aad890edf45d18e5ff73c94 [diff] | |
parent | e6268e58ba0681d566834cbede5fc3e20bbd6ef6 [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);