summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-10-01 01:59:57 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-01 01:59:57 +0200
commit4c6c96a59566e8e876cc803be84c16d3f04f31d4 (patch)
tree3e94386b86ae759d2a6f8605f918785173a92711
parentam aa59a989: am 4b66a280: Merge "minadbd: use strdup() to create argument for sideload thread." (diff)
parentam 754ebaa9: Merge "updater: Skip empty lines in the transfer list file." (diff)
downloadandroid_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.tar
android_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.tar.gz
android_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.tar.bz2
android_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.tar.lz
android_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.tar.xz
android_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.tar.zst
android_bootable_recovery-4c6c96a59566e8e876cc803be84c16d3f04f31d4.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);