Protect our servers from a certain DOS attack: telling the server
that you're sending a giant array and having it try to allocate it. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3820 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -160,6 +160,10 @@ public class ObjectInputStream extends DataInputStream
|
|||||||
// and return the newly read object
|
// and return the newly read object
|
||||||
return target;
|
return target;
|
||||||
|
|
||||||
|
} catch (OutOfMemoryError oome) {
|
||||||
|
throw (IOException)
|
||||||
|
new IOException("Malformed object data").initCause(oome);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
// clear out our current object references
|
// clear out our current object references
|
||||||
_current = null;
|
_current = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user