Skip to content
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

String copy and JNI fixes #1153

Merged
merged 1 commit into from Feb 19, 2021
Merged

String copy and JNI fixes #1153

merged 1 commit into from Feb 19, 2021

Conversation

kstenerud
Copy link
Contributor

Goal

JNI-to-JVM calls could return garbage data if an exception is thrown by the JVM.
String copies were not all uniform, and in some cases would not be null terminated.
Some string functions (such as length calculation) are better handled by the standard library.

Design

  • Fix missing null termination, and consoliate string copy functionality into one function.
  • Remove custom string length functions.
  • Return NULL or default values from JNI-to-JVM calls when an exception occurs.

Testing

Re-ran unit tests and e2e tests

…y into one function.

Remove custom string length functions.
Return NULL or default values from JNI-to-JVM calls when an exception occurs.
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending a changelog entry, and resolution of one query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants