mirror of https://github.com/apache/lucene.git
avoid ArrayIndexOutOfBoundsException in method refill() when bufferLength gets a negativ value. It happens when TermVectorsReader.get(int docID) is used with a docID larger than number of documents stored in the index.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cedcddf4c6
commit
16552ede59
|
@ -56,7 +56,7 @@ public abstract class BufferedIndexInput extends IndexInput {
|
|||
if (end > length()) // don't read past EOF
|
||||
end = length();
|
||||
bufferLength = (int)(end - start);
|
||||
if (bufferLength == 0)
|
||||
if (bufferLength <= 0)
|
||||
throw new IOException("read past EOF");
|
||||
|
||||
if (buffer == null)
|
||||
|
|
Loading…
Reference in New Issue