| 111 | // 500M |
| 112 | const int g_sizelimit = 1024 * 1024 * 500; |
| 113 | static bool LoadCode(LoadState *S, Proto *f) { |
| 114 | int n = LoadInt(S); |
| 115 | if (n > g_sizelimit) |
| 116 | { |
| 117 | return false; |
| 118 | } |
| 119 | |
| 120 | f->code = luaM_newvector(S->L, n, Instruction); |
| 121 | f->sizecode = n; |
| 122 | LoadVector(S, f->code, n); |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | |
| 127 | static void LoadFunction(LoadState *S, Proto *f, TString *psource); |
no test coverage detected