错误数据有可能导致死循环 (#1225)

This commit is contained in:
hong
2020-07-29 07:13:57 +08:00
committed by GitHub
parent c749b13010
commit 950389599d

View File

@@ -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;