mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
错误数据有可能导致死循环 (#1225)
This commit is contained in:
@@ -246,6 +246,9 @@ op_reply(lua_State *L) {
|
||||
lua_rawseti(L, 2, i);
|
||||
|
||||
int32_t doc_len = get_length((document)doc);
|
||||
if (doc_len <= 0) {
|
||||
return luaL_error(L, "Invalid result bson document");
|
||||
}
|
||||
|
||||
doc += doc_len;
|
||||
sz -= doc_len;
|
||||
|
||||
Reference in New Issue
Block a user