You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2023/07/27 01:35:23 UTC

[pinot] branch master updated: safely multiply integers to prevent overflow (#11186)

This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c7fde0c5a safely multiply integers to prevent overflow (#11186)
1c7fde0c5a is described below

commit 1c7fde0c5a686cbffbbb58ba69d50c9bd68fc55d
Author: Christopher Peck <27...@users.noreply.github.com>
AuthorDate: Wed Jul 26 18:35:18 2023 -0700

    safely multiply integers to prevent overflow (#11186)
---
 .../local/realtime/impl/forward/FixedByteMVMutableForwardIndex.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/forward/FixedByteMVMutableForwardIndex.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/forward/FixedByteMVMutableForwardIndex.java
index ef0a1b08d7..1938e2122b 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/forward/FixedByteMVMutableForwardIndex.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/forward/FixedByteMVMutableForwardIndex.java
@@ -163,7 +163,7 @@ public class FixedByteMVMutableForwardIndex implements MutableForwardIndex {
    */
   private void addDataBuffer(int rowCapacity) {
     try {
-      long size = rowCapacity * _columnSizeInBytes;
+      long size = (long) rowCapacity * (long) _columnSizeInBytes;
       LOGGER.info("Allocating data buffer of size {} for column {}", size, _context);
       // NOTE: PinotDataBuffer is tracked in PinotDataBufferMemoryManager. No need to track and close inside the class.
       PinotDataBuffer dataBuffer = _memoryManager.allocate(size, _context);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org