Skip to content

Commit

Permalink
Merge pull request #677 from cldellow/oob-read-publishgroup
Browse files Browse the repository at this point in the history
SortedNodeStore::publishGroup: out of bounds read
  • Loading branch information
systemed authored Feb 10, 2024
2 parents c630400 + 491ef83 commit 9cad4f5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sorted_node_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,11 @@ void SortedNodeStore::publishGroup(const std::vector<element_t>& nodes) {
lastChunk = currentChunk;
}

tmpLatpLons[currentNodeIndex] = nodes[i].second.latp;
tmpLatpLons[currentNodeIndex + 256] = nodes[i].second.lon;
currentNodeIndex++;
if (i != nodes.size()) {
tmpLatpLons[currentNodeIndex] = nodes[i].second.latp;
tmpLatpLons[currentNodeIndex + 256] = nodes[i].second.lon;
currentNodeIndex++;
}
}

uint64_t chunks = currentChunkIndex;
Expand Down

0 comments on commit 9cad4f5

Please sign in to comment.