Skip to content

Commit

Permalink
IVSIS3LikeFSHandler::GetUploadChunkSizeInBytes(): rewrite test in a w…
Browse files Browse the repository at this point in the history
…ay to please Coverity Scan (CID 1546505, 1546504)
  • Loading branch information
rouault committed May 26, 2024
1 parent 4a39088 commit 3b232ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion port/cpl_vsil_s3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,8 @@ size_t IVSIS3LikeFSHandler::GetUploadChunkSizeInBytes(
nChunkSize =
static_cast<size_t>(GetDefaultPartSizeInMiB()) * MIB_CONSTANT;
}
else if (nChunkSizeInt / MIB_CONSTANT >= GetMaximumPartSizeInMiB())
else if (nChunkSizeInt >
static_cast<int64_t>(GetMaximumPartSizeInMiB()) * MIB_CONSTANT)
{
CPLError(CE_Warning, CPLE_AppDefined,
"Specified chunk size too large. Clamping to %d MiB",
Expand Down

0 comments on commit 3b232ee

Please sign in to comment.