You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "zero (Jira)" <ji...@apache.org> on 2020/08/08 07:04:00 UTC

[jira] [Created] (THRIFT-5262) Fix a encoding struct bug in the compact protocol implementation to lua

zero created THRIFT-5262:
----------------------------

             Summary: Fix a encoding struct bug in the compact protocol implementation to lua
                 Key: THRIFT-5262
                 URL: https://issues.apache.org/jira/browse/THRIFT-5262
             Project: Thrift
          Issue Type: Bug
          Components: Lua - Library
    Affects Versions: 0.13.0
            Reporter: zero


code in lib/lua/TCompactProtocol.lua as follow:

function TCompactProtocol:writeStructBegin(name)
  self.lastFieldIndex = self.lastFieldIndex + 1
  self.lastField[self.lastFieldIndex] = self.lastFieldId
  self.lastFieldId = 0
end

the lastFieldId is saved into the new lastFieldIndex pos and then is restored mistakenly later.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)