aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Anderson <saa@android.com>2012-02-24 13:29:31 -0800
committerMike J. Chen <mjchen@google.com>2012-03-03 17:29:37 -0800
commitccec2636b7e310369e1d5ffca9991601b9778bc5 (patch)
tree516fe04ddefaf64090d356abec896c2d24d78ba2
parent5bc4f1f181cf9057cd22290b3af818c15076cbf3 (diff)
downloaduboot-ccec2636b7e310369e1d5ffca9991601b9778bc5.tar.gz
FASTBOOT: Fix crash when erasing non-existent partition
It's a bad idea to dereference a known NULL pointer. Change-Id: I5e56f55822b0e7200df6958658e6c7d709dab5ae Signed-off-by: Scott Anderson <saa@android.com>
-rw-r--r--common/cmd_fastboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index 85b3b1d37..0cef2ec06 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -814,7 +814,7 @@ static void fbt_handle_erase(char *cmdbuf)
ptn = fastboot_flash_find_ptn(partition_name);
if (ptn == 0) {
- printf("Partition %s does not exist\n", ptn->name);
+ printf("Partition %s does not exist\n", partition_name);
sprintf(priv.response, "FAILpartition does not exist");
return;
}