You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the build system is still generating the char* vFilters = (char*)env->GetStringUTFChars(obj_vFilters, 0);, which causes an access violation when vFilters is null. I saw elsewhere in the library a check that uses obj_name == NULL, but this is not a safe way to check for a null as jni can have an object that is flagged as null, but not equal to null in the situation of a weak reference.
Is there a way to prevent the build system from generating the char* vFilters = (char*)env->GetStringUTFChars(obj_vFilters, 0); and env->ReleaseStringUTFChars(obj_vFilters, vFilters);?
Thanks,
Trevor
The text was updated successfully, but these errors were encountered:
Hello @SpaiR,
I would like to perform a null check to allow passing a null pointer through to native code.
Example:
But the build system is still generating the
char* vFilters = (char*)env->GetStringUTFChars(obj_vFilters, 0);
, which causes an access violation whenvFilters
is null. I saw elsewhere in the library a check that usesobj_name == NULL
, but this is not a safe way to check for a null as jni can have an object that is flagged as null, but not equal to null in the situation of a weak reference.Is there a way to prevent the build system from generating the
char* vFilters = (char*)env->GetStringUTFChars(obj_vFilters, 0);
andenv->ReleaseStringUTFChars(obj_vFilters, vFilters);
?Thanks,
Trevor
The text was updated successfully, but these errors were encountered: