Skip to content

Commit 613c839

Browse files
committed
int overflow
1 parent e9cfd0c commit 613c839

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/actiontech/dble/DbleServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public void startup() throws IOException {
325325
short bufferPoolPageNumber = system.getBufferPoolPageNumber();
326326
//minimum allocation unit
327327
short bufferPoolChunkSize = system.getBufferPoolChunkSize();
328-
if (bufferPoolPageSize * bufferPoolPageNumber > Platform.getMaxDirectMemory()) {
328+
if ((long) bufferPoolPageSize * (long) bufferPoolPageNumber > Platform.getMaxDirectMemory()) {
329329
throw new IOException("Direct BufferPool size[bufferPoolPageSize(" + bufferPoolPageSize + ")*bufferPoolPageNumber(" + bufferPoolPageNumber + ")] lager than MaxDirectMemory[" + Platform.getMaxDirectMemory() + "]");
330330
}
331331
bufferPool = new DirectByteBufferPool(bufferPoolPageSize, bufferPoolChunkSize, bufferPoolPageNumber);

0 commit comments

Comments
 (0)