Skip to content

Fix broken reading of SSH public keys from a file#2919

Closed
nnposter wants to merge 1 commit intonmap:masterfrom
nnposter:nselibssh2-read-publickey
Closed

Fix broken reading of SSH public keys from a file#2919
nnposter wants to merge 1 commit intonmap:masterfrom
nnposter:nselibssh2-read-publickey

Conversation

@nnposter
Copy link

Loading of SSH public keys from a file via libssh2.read_publickey() fails because the routine does not preserve balanced Lua stack across operations performed on a luaL_Buffer object. Moving the code around rectifies the issue.

A minuscule optimization added by replacing lua_pushstring with lua_pushliteral.

The PR will be committed after September 6, 2024, unless concerns are raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant