Skip to content

Commit

Permalink
gdalmultidim: avoid doing (harmless) unsigned integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Mar 14, 2024
1 parent 210fbbf commit 5132de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcore/gdalmultidim_subsetdimension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ bool GDALSubsetArray::IRead(const GUInt64 *arrayStartIdx, const size_t *count,
if (arrayStep[0] > 0)
arrayIdx += arrayStep[0];
else
arrayIdx -= -arrayStep[0];
arrayIdx -= static_cast<GUInt64>(-arrayStep[0]);
pabyDstBuffer += bufferStride[0] * nBufferDTSize;
}
return true;
Expand Down

0 comments on commit 5132de2

Please sign in to comment.