Tesseract attempts to allocate a 312kb structure on the stack.  This causes overflows in certain low-stack-overhead environments (such as JNI code on Win32).  The enclosed patch fixes this problem.

--- tesseract-1.03/ccstruct/polyaprx.cpp        2006-06-16 15:17:04.000000000 -0700
+++ tesseract-1.03/ccstruct/polyaprx.cpp        2007-02-17 15:34:59.000000000 -0800
@@ -78,7 +78,8 @@
   POLYPT_LIST polypts;           //output polygon
   POLYPT *polypt;                //converted point
   POLYPT_IT poly_it = &polypts;  //iterator
-  EDGEPT edgepts[MAXEDGELENGTH]; //converted path
+  //EDGEPT edgepts[MAXEDGELENGTH]; //converted path
+  EDGEPT* edgepts = (EDGEPT*)malloc(MAXEDGELENGTH * sizeof(EDGEPT)); //converted path

   loop_box = c_outline->bounding_box ();
   area = loop_box.height ();
@@ -98,6 +99,7 @@
     edgept = edgept->next;
   }
   while (edgept != startpt);
+  free(edgepts);
   if (poly_it.length () <= 2)
     return NULL;
   else