Skip to content

Commit 0c7a279

Browse files
committed
fix crash in resumable donwload.
1 parent bf4a2d7 commit 0c7a279

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/src/resumable/ResumableDownloader.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ GetObjectOutcome ResumableDownloader::Download()
205205
for (size_t i = 1; i < downloadedParts.size(); i++) {
206206
localCRC64 = CRC64::CombineCRC(localCRC64, downloadedParts[i].crc64, downloadedParts[i].size);
207207
}
208-
if (localCRC64 != outcomes[0].result().Metadata().CRC64()) {
208+
if (localCRC64 != meta.CRC64()) {
209209
return GetObjectOutcome(OssError("CrcCheckError", "ResumableDownload object CRC checksum fail."));
210210
}
211211
}
@@ -225,7 +225,7 @@ GetObjectOutcome ResumableDownloader::Download()
225225

226226
if (meta.HttpMetaData().find("x-oss-hash-crc64ecma-by-client") != meta.HttpMetaData().end()) {
227227
meta.HttpMetaData().erase("x-oss-hash-crc64ecma-by-client");
228-
}
228+
}
229229

230230
if (!renameTempFile()) {
231231
std::stringstream ss;

0 commit comments

Comments
 (0)