diff options
author | Elliott Hughes <enh@google.com> | 2015-11-03 00:03:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-11-03 00:03:40 +0000 |
commit | 9eab7875602dec9910002f080df513077f56a2dd (patch) | |
tree | df474ed88cd054f934ceed93591eb8df99d85933 /fastboot/fastboot.cpp | |
parent | d0f45aa24c09c0802784263fe2dccd38e226e23a (diff) | |
parent | 77c0e66bef637aa749c5618e2bdec1c829f79e58 (diff) |
Merge "Work around an angler bootloader bug."
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r-- | fastboot/fastboot.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 5745fb0a4..226f3effe 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -44,6 +44,7 @@ #include <unistd.h> #include <base/parseint.h> +#include <base/strings.h> #include <sparse/sparse.h> #include <ziparchive/zip_archive.h> @@ -575,6 +576,9 @@ static int64_t get_target_sparse_limit(usb_handle* usb) { return 0; } + // Some bootloaders (angler, for example) send spurious whitespace too. + max_download_size = android::base::Trim(max_download_size); + uint64_t limit; if (!android::base::ParseUint(max_download_size.c_str(), &limit)) { fprintf(stderr, "couldn't parse max-download-size '%s'\n", max_download_size.c_str()); |