From f50b153c9e43eb2c8999879e875f189d60adc4a9 Mon Sep 17 00:00:00 2001 From: clay_shooter Date: Sun, 24 Sep 2006 13:47:02 +0000 Subject: [PATCH] SF1511033 fix array index out of bounds problem --- jni/Dispatch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jni/Dispatch.cpp b/jni/Dispatch.cpp index 40b9766..0f31285 100644 --- a/jni/Dispatch.cpp +++ b/jni/Dispatch.cpp @@ -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;