SF1511033 fix array index out of bounds problem

This commit is contained in:
clay_shooter
2006-09-24 13:47:02 +00:00
parent 6c2c357a77
commit f50b153c9e

View File

@@ -305,7 +305,8 @@ JNIEXPORT jintArray JNICALL Java_com_jacob_com_Dispatch_getIDsOfNames
return NULL;
}
jintArray iarr = env->NewIntArray(l);
env->SetIntArrayRegion(iarr, i, l, dispid);
// SF 1511033 -- the 2nd parameter should be 0 and not i!
env->SetIntArrayRegion(iarr, 0, l, dispid);
CoTaskMemFree(lps);
CoTaskMemFree(dispid);
return iarr;