Skip to content

lua-lsm: fix length handling for Lua string buffers#9

Open
chenzongyao200127 wants to merge 2 commits into
openanolis:lua-lsmfrom
chenzongyao200127:lua-lsm-2c8a177-string-buffer-len
Open

lua-lsm: fix length handling for Lua string buffers#9
chenzongyao200127 wants to merge 2 commits into
openanolis:lua-lsmfrom
chenzongyao200127:lua-lsm-2c8a177-string-buffer-len

Conversation

@chenzongyao200127
Copy link
Copy Markdown
Collaborator

lua_tolstring() returns the byte length through an out parameter. The marshalling helpers passed pointer-sized storage in places that only need the returned length value.

Use the local length variable consistently so Lua strings with embedded NUL bytes are marshalled using the length reported by Lua.

Validation:

  • ./scripts/checkpatch.pl --git origin/lua-lsm..lua-lsm-2c8a177-string-buffer-len
  • git diff --check origin/lua-lsm..lua-lsm-2c8a177-string-buffer-len

Signed-off-by: Zongyao Chen ZongYao.Chen@linux.alibaba.com

* lua-lsm: validate inode_init_security xattr output
* lua-lsm: own inode_init_security xattr name storage
* lua-lsm: document OCFS2 xattr name lifetime issue

---------

Signed-off-by: Zongyao Chen <ZongYao.Chen@linux.alibaba.com>
lua_tolstring() returns the byte length through an out parameter.
The marshalling helpers passed pointer-sized storage in places that
only need the returned length value.

Use the local length variable consistently so Lua strings with embedded
NUL bytes are marshalled using the length reported by Lua.

Signed-off-by: Zongyao Chen <ZongYao.Chen@linux.alibaba.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant