Skip to content

Commit bdf9a44

Browse files
committed
OSM: avoid Coverity Scan warning
1 parent 30d5a4b commit bdf9a44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ogr/ogrsf_frmts/osm/ogrosmdatasource.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ void OGROSMDataSource::UncompressWay(int nBytes, const GByte *pabyCompressedWay,
14661466
if (pnTags)
14671467
*pnTags = nTags;
14681468

1469-
// TODO: Some additional safety checks.
1469+
assert(nTags <= MAX_COUNT_FOR_TAGS_IN_WAY);
14701470
for (unsigned int iTag = 0; iTag < nTags; iTag++)
14711471
{
14721472
const int nK = ReadVarInt32(&pabyPtr);
@@ -2629,7 +2629,6 @@ void OGROSMDataSource::ProcessPolygonsStandalone()
26292629
int nBlobSize = sqlite3_column_bytes(m_pahSelectWayStmt[0], 1);
26302630
const void *blob = sqlite3_column_blob(m_pahSelectWayStmt[0], 1);
26312631

2632-
// coverity[tainted_data]
26332632
UncompressWay(nBlobSize, static_cast<const GByte *>(blob), nullptr,
26342633
m_asLonLatCache, &nTags, pasTags, &sInfo);
26352634
CPLAssert(nTags <= MAX_COUNT_FOR_TAGS_IN_WAY);

0 commit comments

Comments
 (0)