summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-10-01 02:05:23 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-01 02:05:23 +0200
commite228541fca4e5ee6a6ef46f7ce69dc23919f8230 (patch)
tree3e94386b86ae759d2a6f8605f918785173a92711
parentam 6eb2668d: am aa59a989: am 4b66a280: Merge "minadbd: use strdup() to create argument for sideload thread." (diff)
parentam 245b2da1: am 754ebaa9: Merge "updater: Skip empty lines in the transfer list file." (diff)
downloadandroid_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.tar
android_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.tar.gz
android_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.tar.bz2
android_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.tar.lz
android_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.tar.xz
android_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.tar.zst
android_bootable_recovery-e228541fca4e5ee6a6ef46f7ce69dc23919f8230.zip
-rw-r--r--updater/blockimg.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index ddb474ffd..54f2b6ed7 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -1428,6 +1428,10 @@ static Value* PerformBlockImageUpdate(const char* name, State* state, int /* arg
// Subsequent lines are all individual transfer commands
for (auto it = lines.cbegin() + start; it != lines.cend(); it++) {
const std::string& line_str(*it);
+ if (line_str.empty()) {
+ continue;
+ }
+
char* line = strdup(line_str.c_str());
params.cmdname = strtok_r(line, " ", &params.cpos);