Loading fastboot/device/commands.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ bool DownloadHandler(FastbootDevice* device, const std::vector<std::string>& arg // arg[0] is the command name, arg[1] contains size of data to be downloaded unsigned int size; if (!android::base::ParseUint("0x" + args[1], &size, UINT_MAX)) { if (!android::base::ParseUint("0x" + args[1], &size, kMaxDownloadSizeDefault)) { return device->WriteStatus(FastbootResult::FAIL, "Invalid size"); } device->download_data().resize(size); Loading fastboot/device/commands.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include <string> #include <vector> constexpr unsigned int kMaxDownloadSizeDefault = 0x20000000; class FastbootDevice; enum class FastbootResult { Loading fastboot/device/variables.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ using ::android::hardware::fastboot::V1_0::FileSystemType; using ::android::hardware::fastboot::V1_0::Result; using ::android::hardware::fastboot::V1_0::Status; constexpr int kMaxDownloadSizeDefault = 0x20000000; constexpr char kFastbootProtocolVersion[] = "0.4"; bool GetVersion(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, Loading Loading
fastboot/device/commands.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ bool DownloadHandler(FastbootDevice* device, const std::vector<std::string>& arg // arg[0] is the command name, arg[1] contains size of data to be downloaded unsigned int size; if (!android::base::ParseUint("0x" + args[1], &size, UINT_MAX)) { if (!android::base::ParseUint("0x" + args[1], &size, kMaxDownloadSizeDefault)) { return device->WriteStatus(FastbootResult::FAIL, "Invalid size"); } device->download_data().resize(size); Loading
fastboot/device/commands.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include <string> #include <vector> constexpr unsigned int kMaxDownloadSizeDefault = 0x20000000; class FastbootDevice; enum class FastbootResult { Loading
fastboot/device/variables.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ using ::android::hardware::fastboot::V1_0::FileSystemType; using ::android::hardware::fastboot::V1_0::Result; using ::android::hardware::fastboot::V1_0::Status; constexpr int kMaxDownloadSizeDefault = 0x20000000; constexpr char kFastbootProtocolVersion[] = "0.4"; bool GetVersion(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, Loading