Commit 3895908
committed
Sanity: Don't spend too much time (or memory) on rediculously large enums
RemoteMirror gets called on lots of malformed type information,
due to memory corruption bugs or even clients that ask RemoteMirror
to decode a chunk of memory to test whether or not it might be
valid type data. In any case, we need to be a little cautious here.
In this case, I've chosen to ignore any enum whose in-memory size
(according to the metadata) is over 1 MiB. We can easily adjust
this limit up if experience shows there really are legitimate enums
this large in the wild.1 parent 346d5b2 commit 3895908
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1987 | 1987 | | |
1988 | 1988 | | |
1989 | 1989 | | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
1990 | 1999 | | |
1991 | 2000 | | |
1992 | 2001 | | |
| |||
0 commit comments