View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000932VTK(No Category)public2004-06-15 17:082011-01-13 17:00
ReporterDavid Marshburn 
Assigned ToMathieu Malaterre 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000932: vtkJavaUtils needs NULL checking
Descriptiona number of functions in vtkJavaUtils need to check input parameters for NULL. for instance, the beginning of vtkJavaUTFToChar should look like this:

JNIEXPORT char *vtkJavaUTFToChar(JNIEnv *env, jstring in)
{
  char *result;
  const char *inBytes;
  int length, i;
  int resultLength = 1;

  if( in == NULL ) return NULL;
  
  length = env->GetStringUTFLength(in);
  inBytes = env->GetStringUTFChars(in,NULL);
---------------------------------------------

vtkJavaGetId should check for null input 'obj'. it's not clear to me what should be returned for the id in that case. the bug here is that the input to env->GetObjectClass must not be null.

vtkJavaSetId should probably just return if the input 'obj' is null.


it looks like the vtkJavaMakeJArray* series of functions are okay with input of a null array and a length of zero. something bad probably happens on a null array and a non-zero length (the input array "ptr" is read later in the function).

(this probably has some implication for the java-wrapped code, where null tests aren't performed).
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0005741)
Mathieu Malaterre (developer)
2006-11-19 21:21

Fixed in VTK CVS.

 Issue History
Date Modified Username Field Change
2011-01-13 17:00 Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00 Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team