You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2010/08/04 12:22:18 UTC
svn commit: r982195 -
/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java
Author: shaie
Date: Wed Aug 4 10:22:17 2010
New Revision: 982195
URL: http://svn.apache.org/viewvc?rev=982195&view=rev
Log:
LUCENE-2547: the never ending issue
Modified:
lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java
Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java?rev=982195&r1=982194&r2=982195&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java (original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java Wed Aug 4 10:22:17 2010
@@ -310,6 +310,11 @@ class CompoundFileReader extends Directo
// If there are more bytes left to copy, delegate the copy task to the
// base IndexInput, in case it can do an optimized copy.
if (numBytes > 0) {
+ long start = getFilePointer();
+ if (start + numBytes > length) {
+ throw new IOException("read past EOF");
+ }
+ base.seek(fileOffset + start);
base.copyBytes(out, numBytes);
}
}