diff options
author | Tao Bao <tbao@google.com> | 2017-03-23 18:03:43 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-23 18:03:43 +0100 |
commit | 9f2062657d1cd006419c8c51886ea939aa350fee (patch) | |
tree | 61d5c0ba51a547d52c6ce98a60aef8f055dd38d4 /updater/install.cpp | |
parent | Merge "recovery: Replace the hard-coded 1000 with AID_SYSTEM." (diff) | |
parent | updater: Fix the broken case for apply_patch_check(). (diff) | |
download | android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.tar android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.tar.gz android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.tar.bz2 android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.tar.lz android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.tar.xz android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.tar.zst android_bootable_recovery-9f2062657d1cd006419c8c51886ea939aa350fee.zip |
Diffstat (limited to 'updater/install.cpp')
-rw-r--r-- | updater/install.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp index c9a0270ec..f91f3fc9f 100644 --- a/updater/install.cpp +++ b/updater/install.cpp @@ -691,7 +691,7 @@ Value* ApplyPatchCheckFn(const char* name, State* state, const std::vector<std:: const std::string& filename = args[0]; std::vector<std::string> sha1s; - if (!ReadArgs(state, argv, &sha1s, 1, argv.size() - 1)) { + if (argv.size() > 1 && !ReadArgs(state, argv, &sha1s, 1, argv.size() - 1)) { return ErrorAbort(state, kArgsParsingFailure, "%s() Failed to parse the argument(s)", name); } int result = applypatch_check(filename.c_str(), sha1s); |