commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r997298 - /commons/proper/daemon/trunk/src/native/windows/src/javajni.c
Date Wed, 15 Sep 2010 11:59:51 GMT
Author: mturk
Date: Wed Sep 15 11:59:51 2010
New Revision: 997298

URL: http://svn.apache.org/viewvc?rev=997298&view=rev
Log:
Guard against fault stack sizes

Modified:
    commons/proper/daemon/trunk/src/native/windows/src/javajni.c

Modified: commons/proper/daemon/trunk/src/native/windows/src/javajni.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/javajni.c?rev=997298&r1=997297&r2=997298&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/javajni.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/javajni.c Wed Sep 15 11:59:51 2010
@@ -334,12 +334,14 @@ apxCreateJava(APXHANDLE hPool, LPCWSTR s
     lpJava = APXHANDLE_DATA(hJava);
     lpJava->lpJvm = lpJvm;
     lpJava->iVmCount = iVmCount;
-    
+
     /* Guess the stack size
      */
     AplZeroMemory(&jArgs1_1, sizeof(jArgs1_1));
     jArgs1_1.version = JNI_VERSION_1_1;
     DYNLOAD_FPTR(JNI_GetDefaultJavaVMInitArgs)(&jArgs1_1);
+    if (jArgs1_1.javaStackSize < 0 || jArgs1_1.javaStackSize > (2048 * 1024))
+        jArgs1_1.javaStackSize = 0;
     lpJava->szStackSize = (SIZE_T)jArgs1_1.javaStackSize;
 
     if (!_st_sys_jvm)



Mime
View raw message