8155259: Suspicious buffer allocation in com.sun.tools.javac.file.BaseFileManager
8172106: javac throws exception when compiling source file of size 1.5G Reviewed-by: vromero
This commit is contained in:
parent
4c0f24ef71
commit
6a07fd0ec1
@ -432,7 +432,7 @@ public abstract class BaseFileManager implements JavaFileManager {
|
|||||||
ByteBuffer result =
|
ByteBuffer result =
|
||||||
(cached != null && cached.capacity() >= capacity)
|
(cached != null && cached.capacity() >= capacity)
|
||||||
? cached.clear()
|
? cached.clear()
|
||||||
: ByteBuffer.allocate(capacity + capacity>>1);
|
: ByteBuffer.allocate(capacity);
|
||||||
cached = null;
|
cached = null;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user