Skip to content

Commit

Permalink
Integer overflow has been fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii0lomakin committed Nov 8, 2023
1 parent 20a429d commit e724b9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ private static void mergeAndStorePartitionsOnDisk(MMapedGraph[] partitions, int
assert edgesSize <= maxConnectionsPerVertex;

edgesOffset += Integer.BYTES;
diskCache.set(ValueLayout.JAVA_INT, resultEdgesCountOffset, (byte) edgesSize);
diskCache.set(ValueLayout.JAVA_INT, resultEdgesCountOffset, (int) edgesSize);

MemorySegment.copy(partition.edges,
edgesOffset,
Expand Down

0 comments on commit e724b9c

Please sign in to comment.