lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>> But until 5.4.3 the code in luaossl worked in practice 
>> even though it was wrong in theory. [...]

> Before 5.4.3, aux. buffers also used the stack, but only 
> when their content reached a minimum size (1K?).  
> So, there is a chance that your code did not work in 
> practice all the time

Errr, it's not "my" code - the note I submitted was for anyone who uses luaossl (by William Ahern and Daurnimator).

I know  Daurnimator must sometimes read this list because they replied to a previous comment about luaossl by asking me to submit a patch for some other issue via Github... but I don't have a Github account so it's here or nowhere. Hoping that they see this email.

As far as I can see, the relevant luaossl code was not affected in Lua 5.4.2 or earlier because the code only calls lua_gettop() once, immediately after calling luaL_buffinit() but before using the buffer, in order to work out the number of caller arguments.

So if I have read it correctly, the relevant functions, cipher:update() and cipher:final(), will always work correctly in Lua 5.4.2 and will always throw an error() in Lua 5.4.3.