zero created THRIFT-5263: ---------------------------- Summary: Fix a bug about reading a zero-size map in the compact protocol implementation to lua Key: THRIFT-5263 URL: https://issues.apache.org/jira/browse/THRIFT-5263 Project: Thrift Issue Type: Bug Components: Lua - Library Affects Versions: 0.13.0 Reporter: zero
bug in lib/lua/TCompactProtocol.lua, code as follow: function TCompactProtocol:readMapBegin() local size = self:readVarint32() local kvtype = 0 if size > 0 then kvtype = self:readSignByte() end local ktype = self:getTType(libluabitwise.shiftr(kvtype, 4)) local vtype = self:getTType(kvtype) return ktype, vtype, size end if the map's size is zero, it should‘t read another byte. -- This message was sent by Atlassian Jira (v8.3.4#803005)