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:
Ray Greenwell
2006-01-25 02:39:18 +00:00
parent dfc8112277
commit abb941223d
@@ -160,6 +160,10 @@ public class ObjectInputStream extends DataInputStream
// and return the newly read object
return target;
} catch (OutOfMemoryError oome) {
throw (IOException)
new IOException("Malformed object data").initCause(oome);
} finally {
// clear out our current object references
_current = null;