mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
Update lua-netpack.c
当长度等于0x10000时,read_size读出的值为0
This commit is contained in:
@@ -435,7 +435,7 @@ static int
|
|||||||
lpack(lua_State *L) {
|
lpack(lua_State *L) {
|
||||||
size_t len;
|
size_t len;
|
||||||
const char * ptr = tolstring(L, &len, 1);
|
const char * ptr = tolstring(L, &len, 1);
|
||||||
if (len > 0x10000) {
|
if (len >= 0x10000) {
|
||||||
return luaL_error(L, "Invalid size (too long) of data : %d", (int)len);
|
return luaL_error(L, "Invalid size (too long) of data : %d", (int)len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user