Merged revision(s) 1305837 from lucene/dev/branches/branch_3x:

Fix possible overflow in RAMOutputStream.sizeInBytes()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1305838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-03-27 13:44:59 +00:00
parent a79cbb5746
commit a2b98d9a51
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ public class RAMOutputStream extends IndexOutput {
/** Returns byte usage of all buffers. */
public long sizeInBytes() {
return file.numBuffers() * BUFFER_SIZE;
return (long) file.numBuffers() * (long) BUFFER_SIZE;
}
@Override