Closed erikvanzijst closed 4 years ago
Whoops I should have merged this PR before I started work on my #65. If you can't fix your conflicts, I can help, let me know 🙂
Whoops I should have merged this PR before I started work on my #65. If you can't fix your conflicts, I can help, let me know 🙂
No worries, I'll resolve it.
Fantastic stuff, I cannot thank you enough!
To avoid a Java-level buffer length bug from taking out the entire JVM with a segfault, perform boundary checks on the length parameters that are passed on to libsodium.
For most usecases the buffer lengths are probably redundant as we can just automatically pass
.length
from Java, removing the need for the caller to explicitly do so. The existence of the unsigned length parameters are primarily to identify the end of the buffer in C; a problem Java does not have.This fixes issue #64