This repository has been archived by the owner on Feb 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Exception During Initialization (Windows) #87
Comments
The exception thrown is:
Here is a short test program that demonstrates the problem (requires using 1.0.16 on Windows). Assumes jUnit:
|
Can be fixed by adding an
|
m4dc4p
pushed a commit
to m4dc4p/kalium
that referenced
this issue
Jan 19, 2018
Added an annotation to the sodium_version_string() method so it is always read as an ASCII string. Avoids some issues on Windows with reading multi-byte strings by default. Added a test to make sure version string matches the expected pattern.
@m4dc4p Works like a charm. It fixed an issue with parsing a Json response from C/C++ library |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Kalium with libsodium 1.0.15 & 1.0.16 is broken, due to incorrect string handling in jnr-ffi.
1.0.15\0\0xsalsa20....
(Version String Changed in Windows Release jedisct1/libsodium#665)\0\0\0\0
). (Broken null-terminated multibyte string handling when JVM is non-USdefaultCharset
jnr/jnr-ffi#108)As a result,
sodium_lib_version
returns "1.0.15\0\0xsalsa20
", andcheckVersion
fails because it tries to convert15\0\0xsalsa20
to an integer.Short of fixing jnr-ffi, Kalium could update its regex when parsing the input string to avoid this bug.
The text was updated successfully, but these errors were encountered: