-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when setting key for chacha20 #51
Comments
I was able to quickly verify that it's the same underlying problem as in #50. If I explicitly change: #define CODEC_TYPE_CHACHA20 3 to #define CODEC_TYPE_CHACHA20 1 and rebuild, then everything works fine. |
Yes, the cause of the problem is indeed the same as in #50. I will provide a fix soon. "Fixing" the problem by simply changing the numeric id of a cipher scheme is not recommended, because using the same numeric cipher id for different cipher schemes can possibly cause problems in the long run. |
If some of the cipher schemes are excluded from compilation, executing cipher-related pragmas could lead to crashes due to wrong indexing based on the numeric cipher ids. Numeric cipher ids are now handled correctly. Note: The default configuration with all cipher schemes enabled is not affected.
I've verified this is fixed now. Thanks! |
As in #50, I'm only explicitly compiling in support for chacha20, however when I set the key via
PRAGMA key = 'foobarbaz'
, I get a segfault. Here's the backtrace:If I compile in all codecs/ciphers, then it works fine, so I suspect there is code assuming the size of
globalCodecParameterTable
or something similar.The text was updated successfully, but these errors were encountered: