From b3d43367ef758ae60c67d531ae094c0181d4c4c4 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 5 Nov 2007 21:17:40 +0000 Subject: [PATCH] [SIGAR-70] fix length argument passed to PdhLookupPerfNameByIndex --- bindings/java/src/jni/win32/pdh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);