From b032fb49f09c020174da1d5d865d878b8351d89d Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Tue, 9 Oct 2012 16:13:00 +0000 Subject: [PATCH] Fix integer overflow. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1396088 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/codecs/compressing/CompressingStoredFieldsIndex.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndex.java b/lucene/codecs/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndex.java index 3262293abf2..b7be254afe5 100644 --- a/lucene/codecs/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndex.java +++ b/lucene/codecs/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndex.java @@ -363,7 +363,7 @@ public enum CompressingStoredFieldsIndex { throw new CorruptIndexException("Expected " + numChunks + " chunks, but got " + startPointerDeltas.size()); } final PackedInts.Mutable startPointers = PackedInts.getMutable(numChunks, bitsPerStartPointer, PackedInts.COMPACT); - int startPointer = 0; + long startPointer = 0; for (int i = 0; i < numChunks; ++i) { startPointer += startPointerDeltas.next(); startPointers.set(i, startPointer);