Merge "Fix the behavior of undefined commands in BlockImageVerify" am: ac4818d6af am: 7b9a92c1e2
am: e0f7c39c4f

Change-Id: I33b49c01cfaa0e1ec8bfc7f92ffe5c7d034c3bf4
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index feb2aeb..4f085b2 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -1727,9 +1727,11 @@
 
     const Command* cmd = cmd_map[params.cmdname];
 
+    // Skip the command if we explicitly set the corresponding function pointer to nullptr, e.g.
+    // "erase" during block_image_verify.
     if (cmd->f == nullptr) {
-      LOG(ERROR) << "failed to find the function for command [" << line << "]";
-      goto pbiudone;
+      LOG(DEBUG) << "skip executing command [" << line << "]";
+      continue;
     }
 
     // Skip all commands before the saved last command index when resuming an update.