mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
Check req size , See #1481
This commit is contained in:
@@ -366,6 +366,8 @@ lunpackrequest(lua_State *L) {
|
|||||||
msg = luaL_checklstring(L,1,&ssz);
|
msg = luaL_checklstring(L,1,&ssz);
|
||||||
sz = (int)ssz;
|
sz = (int)ssz;
|
||||||
}
|
}
|
||||||
|
if (sz == 0)
|
||||||
|
return luaL_error(L, "Invalid req package. size == 0");
|
||||||
switch (msg[0]) {
|
switch (msg[0]) {
|
||||||
case 0:
|
case 0:
|
||||||
return unpackreq_number(L, (const uint8_t *)msg, sz);
|
return unpackreq_number(L, (const uint8_t *)msg, sz);
|
||||||
|
|||||||
Reference in New Issue
Block a user