diff --git a/bindings/java/src/jni/win32/pdh.c b/bindings/java/src/jni/win32/pdh.c index 8e7687ab..4842a53c 100644 --- a/bindings/java/src/jni/win32/pdh.c +++ b/bindings/java/src/jni/win32/pdh.c @@ -432,7 +432,7 @@ JNIEXPORT jstring SIGAR_JNI(win32_Pdh_pdhLookupPerfName) (JNIEnv *env, jclass cur, jint index) { TCHAR path[MAX_PATH]; - DWORD len = sizeof(path); + DWORD len = MAX_PATH; /* len is number of TCHAR's, not sizeof(path) */ PDH_STATUS status = PdhLookupPerfNameByIndex(NULL, index, path, &len);