Commit 9ad1f9dd authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added TODO.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2800 b35dd754-fafc-0310-a699-88a17e54d16e
parent eca07b18
...@@ -223,7 +223,9 @@ public class TLSWrapper { ...@@ -223,7 +223,9 @@ public class TLSWrapper {
} }
private ByteBuffer resizeApplicationBuffer(ByteBuffer app) { private ByteBuffer resizeApplicationBuffer(ByteBuffer app) {
if (app.remaining() < appBuffSize) { // TODO Creating new buffers and copying over old one may not scale and may even be a
// security risk. Consider using views. Thanks to Noah for the tip.
if (app.remaining() < appBuffSize) {
ByteBuffer bb = ByteBuffer.allocate(app.capacity() + appBuffSize); ByteBuffer bb = ByteBuffer.allocate(app.capacity() + appBuffSize);
app.flip(); app.flip();
bb.put(app); bb.put(app);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment