Update lua-netpack.c

当长度等于0x10000时,read_size读出的值为0
This commit is contained in:
huanzai
2015-11-12 11:15:50 +08:00
parent fa729d593b
commit 7138144a68

View File

@@ -435,7 +435,7 @@ static int
lpack(lua_State *L) {
size_t len;
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);
}