Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 325ba6ff authored by qiwu chen's avatar qiwu chen
Browse files

fastboot: Initialize UploadInner dsize value to 0



We must initialize UploadInner dsize value to 0, in case
stuck in ReadBuffer when receive DATA packet which dsize
is 0 or non DATA type packet. This will lead to fastboot
hang up unless USB unplugged.

Change-Id: I1e9752585c3d1013b1b1da38ead9ba4c532c2d34
Signed-off-by: default avatarqiwu chen <qiwuchen55@gmail.com>
parent 50ca4484
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ RetCode FastBootDriver::Upload(const std::string& outfile, std::string* response
RetCode FastBootDriver::UploadInner(const std::string& outfile, std::string* response,
                                    std::vector<std::string>* info) {
    RetCode ret;
    int dsize;
    int dsize = 0;
    if ((ret = RawCommand(FB_CMD_UPLOAD, response, info, &dsize))) {
        error_ = "Upload request failed: " + error_;
        return ret;